Last active 1764863694

dockge_debian.sh Raw
1#!/bin/sh
2
3set -e
4
5echo 'Preparing start!'
6
7# prepare packges
8echo '--------------------'
9echo 'install packages'
10echo '--------------------'
11apt-get update
12apt-get install ufw nano mc htop iftop ca-certificates curl -y
13
14# docker
15echo '--------------------'
16echo 'install docker'
17echo '--------------------'
18install -m 0755 -d /etc/apt/keyrings
19curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
20chmod a+r /etc/apt/keyrings/docker.asc
21
22# Add the repository to Apt sources:
23tee /etc/apt/sources.list.d/docker.sources <<EOF
24Types: deb
25URIs: https://download.docker.com/linux/debian
26Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
27Components: stable
28Signed-By: /etc/apt/keyrings/docker.asc
29EOF
30
31apt update
32
33apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
34
35
36# Dockge
37echo '--------------------'
38echo 'install Dockge'
39echo '--------------------'
40mkdir -p /opt/stacks /opt/dockge
41curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output /opt/dockge/compose.yaml
42docker compose -f /opt/dockge/compose.yaml up -d
43
44# info
45echo '####################'
46echo 'Preparing complete!'
47echo '####################'
48
49echo 'Please connect to server on http://ip:5001 to configure Dockge'
dockge_ubuntu.sh Raw
1#!/bin/sh
2
3set -e
4
5echo 'Preparing start!'
6
7# prepare packges
8echo '--------------------'
9echo 'install packages'
10echo '--------------------'
11apt-get update
12apt-get install ufw nano mc htop iftop ca-certificates curl -y
13
14# docker
15echo '--------------------'
16echo 'install docker'
17echo '--------------------'
18install -m 0755 -d /etc/apt/keyrings
19curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
20chmod a+r /etc/apt/keyrings/docker.asc
21echo \
22 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
23 $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
24 sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
25apt-get update
26apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
27
28# Dockge
29echo '--------------------'
30echo 'install Dockge'
31echo '--------------------'
32mkdir -p /opt/stacks /opt/dockge
33curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output /opt/dockge/compose.yaml
34docker compose -f /opt/dockge/compose.yaml up -d
35
36# info
37echo '####################'
38echo 'Preparing complete!'
39echo '####################'
40
41echo 'Please connect to server on http://ip:5001 to configure Dockge'
42
43
nginx.sh Raw
1#!/bin/sh
2
3set -e
4
5echo 'Preparing start!'
6
7# prepare packges
8echo '--------------------'
9echo 'install packages'
10echo '--------------------'
11apt-get update
12apt-get install ufw nano mc htop iftop ca-certificates curl -y
13
14
15# nginx
16echo '--------------------'
17echo 'install nginx'
18echo '--------------------'
19#apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y
20#echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
21# | sudo tee /etc/apt/sources.list.d/nginx.list
22#apt update
23apt install nginx -y
24systemctl enable --now nginx
25
26# certbot
27echo '--------------------'
28echo 'install certbot'
29echo '--------------------'
30apt-get install python3-certbot-nginx -y
31
32# nginxUI
33echo '--------------------'
34echo 'install nginxUI'
35echo '--------------------'
36bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install
37ufw allow 9000
38
39# info
40echo '####################'
41echo 'Preparing complete!'
42echo '####################'
43
44echo 'Please connect to server on http://ip:9000 to configure nginxUI, then close :9000 port using "ufw delete allow 9000"'
45
prepare_full.sh Raw
1#!/bin/sh
2
3set -e
4
5echo 'Preparing start!'
6
7# prepare packges
8echo '--------------------'
9echo 'install packages'
10echo '--------------------'
11apt-get update
12apt-get install ufw nano mc htop iftop ca-certificates curl -y
13
14# ufw
15echo '--------------------'
16echo 'install ufw'
17echo '--------------------'
18ufw allow 80
19ufw allow 443
20ufw allow 22
21ufw --force enable
22ufw default deny incoming
23
24# docker
25echo '--------------------'
26echo 'install docker'
27echo '--------------------'
28install -m 0755 -d /etc/apt/keyrings
29curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
30chmod a+r /etc/apt/keyrings/docker.asc
31echo \
32 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
33 $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
34 sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
35apt-get update
36apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
37
38# Dockge
39echo '--------------------'
40echo 'install Dockge'
41echo '--------------------'
42mkdir -p /opt/stacks /opt/dockge
43curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output /opt/dockge/compose.yaml
44docker compose -f /opt/dockge/compose.yaml up -d
45
46# nginx
47echo '--------------------'
48echo 'install nginx'
49echo '--------------------'
50#apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y
51#echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
52# | sudo tee /etc/apt/sources.list.d/nginx.list
53#apt update
54apt install nginx -y
55systemctl enable --now nginx
56
57# certbot
58echo '--------------------'
59echo 'install certbot'
60echo '--------------------'
61apt-get install python3-certbot-nginx -y
62
63# nginxUI
64echo '--------------------'
65echo 'install nginxUI'
66echo '--------------------'
67bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install
68ufw allow 9000
69
70# info
71echo '####################'
72echo 'Preparing complete!'
73echo '####################'
74
75echo 'Please connect to server on http://ip:5001 to configure Dockge'
76echo 'Please connect to server on http://ip:9000 to configure nginxUI, then close :9000 port using "ufw delete allow 9000"'
77