Last active 1764863694

admin revised this gist 1757809214. Go to revision

1 file changed, 2 insertions, 2 deletions

prepare.sh

@@ -51,14 +51,14 @@ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
51 51 http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
52 52 | sudo tee /etc/apt/sources.list.d/nginx.list
53 53 apt update
54 - apt install nginx
54 + apt install nginx -y
55 55 systemctl enable --now nginx
56 56
57 57 # certbot
58 58 echo '--------------------'
59 59 echo 'install certbot'
60 60 echo '--------------------'
61 - apt-get install python3-certbot-nginx
61 + apt-get install python3-certbot-nginx -y
62 62
63 63 # nginxUI
64 64 echo '--------------------'

admin revised this gist 1757809122. Go to revision

1 file changed, 4 insertions, 4 deletions

prepare.sh

@@ -8,7 +8,7 @@ echo 'install packages'
8 8 echo '--------------------'
9 9 # prepare packages
10 10 apt-get update
11 - apt-get install ufw nano mc htop iftop ca-certificates curl
11 + apt-get install ufw nano mc htop iftop ca-certificates curl -y
12 12
13 13 # ufw
14 14 echo '--------------------'
@@ -17,7 +17,7 @@ echo '--------------------'
17 17 ufw allow 80
18 18 ufw allow 443
19 19 ufw allow 22
20 - ufw enable
20 + ufw --force enable
21 21 ufw default deny incoming
22 22
23 23 # docker
@@ -32,7 +32,7 @@ echo \
32 32 $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
33 33 sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
34 34 apt-get update
35 - apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
35 + apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
36 36
37 37 # Dockge
38 38 echo '--------------------'
@@ -40,7 +40,7 @@ echo 'install Dockge'
40 40 echo '--------------------'
41 41 mkdir -p /opt/stacks /opt/dockge
42 42 curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output /opt/dockge/compose.yaml
43 - docker compose up -d -f /opt/dockge/compose.yaml
43 + docker compose -f /opt/dockge/compose.yaml up -d
44 44
45 45 # nginx
46 46 echo '--------------------'

admin revised this gist 1757719570. Go to revision

1 file changed, 1 insertion, 1 deletion

prepare.sh

@@ -72,4 +72,4 @@ echo '####################'
72 72 echo 'Preparing complete!'
73 73 echo '####################'
74 74
75 - echo 'Please connect to server on http://ip:9000 to configure nginxUI, then close :9000 port using "ufw delete allow 9000"'
75 + echo 'Please connect to server on http://ip:9000 to configure nginxUI, then close :9000 port using "ufw delete allow 9000"'

admin revised this gist 1757719183. Go to revision

1 file changed, 75 insertions

prepare.sh(file created)

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