From c14c737e8a8cb9a1dc2470ba75e4bc54221ad887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huy=CC=80nh=20Quo=CC=82=CC=81c=20=C4=90a=CC=A3t?= Date: Sun, 19 Jan 2025 10:35:58 +0700 Subject: [PATCH] =?UTF-8?q?C=C3=A0i=20=C4=91=E1=BA=B7t=20nukeviet5.0=20tr?= =?UTF-8?q?=C3=AAn=20docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {4.6-nginx => 5.0-nginx}/.env | 0 {4.6-nginx => 5.0-nginx}/conf/my.cnf | 0 .../conf/nginx/default.conf | 0 {4.6-nginx => 5.0-nginx}/conf/nginx/server.crt | 0 {4.6-nginx => 5.0-nginx}/conf/nginx/server.key | 0 {4.6-nginx => 5.0-nginx}/conf/nginx/ssl.conf | 0 {4.6-nginx => 5.0-nginx}/conf/php82/Dockerfile | 0 {4.6-nginx => 5.0-nginx}/docker-compose.yml | 18 +++++++++--------- {4.6-nginx => 5.0-nginx}/setup.sh | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) rename {4.6-nginx => 5.0-nginx}/.env (100%) rename {4.6-nginx => 5.0-nginx}/conf/my.cnf (100%) rename {4.6-nginx => 5.0-nginx}/conf/nginx/default.conf (100%) rename {4.6-nginx => 5.0-nginx}/conf/nginx/server.crt (100%) rename {4.6-nginx => 5.0-nginx}/conf/nginx/server.key (100%) rename {4.6-nginx => 5.0-nginx}/conf/nginx/ssl.conf (100%) rename {4.6-nginx => 5.0-nginx}/conf/php82/Dockerfile (100%) rename {4.6-nginx => 5.0-nginx}/docker-compose.yml (80%) rename {4.6-nginx => 5.0-nginx}/setup.sh (96%) diff --git a/4.6-nginx/.env b/5.0-nginx/.env similarity index 100% rename from 4.6-nginx/.env rename to 5.0-nginx/.env diff --git a/4.6-nginx/conf/my.cnf b/5.0-nginx/conf/my.cnf similarity index 100% rename from 4.6-nginx/conf/my.cnf rename to 5.0-nginx/conf/my.cnf diff --git a/4.6-nginx/conf/nginx/default.conf b/5.0-nginx/conf/nginx/default.conf similarity index 100% rename from 4.6-nginx/conf/nginx/default.conf rename to 5.0-nginx/conf/nginx/default.conf diff --git a/4.6-nginx/conf/nginx/server.crt b/5.0-nginx/conf/nginx/server.crt similarity index 100% rename from 4.6-nginx/conf/nginx/server.crt rename to 5.0-nginx/conf/nginx/server.crt diff --git a/4.6-nginx/conf/nginx/server.key b/5.0-nginx/conf/nginx/server.key similarity index 100% rename from 4.6-nginx/conf/nginx/server.key rename to 5.0-nginx/conf/nginx/server.key diff --git a/4.6-nginx/conf/nginx/ssl.conf b/5.0-nginx/conf/nginx/ssl.conf similarity index 100% rename from 4.6-nginx/conf/nginx/ssl.conf rename to 5.0-nginx/conf/nginx/ssl.conf diff --git a/4.6-nginx/conf/php82/Dockerfile b/5.0-nginx/conf/php82/Dockerfile similarity index 100% rename from 4.6-nginx/conf/php82/Dockerfile rename to 5.0-nginx/conf/php82/Dockerfile diff --git a/4.6-nginx/docker-compose.yml b/5.0-nginx/docker-compose.yml similarity index 80% rename from 4.6-nginx/docker-compose.yml rename to 5.0-nginx/docker-compose.yml index 4e652c8..475d2e2 100644 --- a/4.6-nginx/docker-compose.yml +++ b/5.0-nginx/docker-compose.yml @@ -3,12 +3,12 @@ networks: driver: bridge ipam: config: - - subnet: 172.18.0.0/16 - ip_range: 172.18.5.0/24 + - subnet: 172.20.0.0/16 + ip_range: 172.20.5.0/24 services: db: - container_name: db + container_name: nukeviet_db hostname: db image: mariadb:11.4 volumes: @@ -22,10 +22,10 @@ services: bash -c " chmod 644 /etc/mysql/conf.d/nukeviet.cnf && /usr/local/bin/docker-entrypoint.sh mariadbd " networks: nukeviet: - ipv4_address: 172.18.5.1 + ipv4_address: 172.20.5.1 phpmyadmin: - container_name: phpmyadmin + container_name: nukeviet_phpmyadmin hostname: phpmyadmin image: phpmyadmin:5.2.1-apache environment: @@ -36,10 +36,10 @@ services: - db networks: nukeviet: - ipv4_address: 172.18.5.2 + ipv4_address: 172.20.5.2 nginx: - container_name: nginx + container_name: nukeviet_nginx image: nginx:1.27 volumes: - ./conf/nginx:/etc/nginx/conf.d @@ -51,7 +51,7 @@ services: - 8443:443 networks: nukeviet: - ipv4_address: 172.18.5.3 + ipv4_address: 172.20.5.3 depends_on: - nukeviet @@ -65,7 +65,7 @@ services: - ./src/src:/var/www/html networks: nukeviet: - ipv4_address: 172.18.5.4 + ipv4_address: 172.20.5.4 environment: TZ: ${TimeZone} depends_on: diff --git a/4.6-nginx/setup.sh b/5.0-nginx/setup.sh similarity index 96% rename from 4.6-nginx/setup.sh rename to 5.0-nginx/setup.sh index c1a939a..b65bff3 100644 --- a/4.6-nginx/setup.sh +++ b/5.0-nginx/setup.sh @@ -47,7 +47,7 @@ mkdir -p "$DIR_PATH/db" if [ ! -f "$DIR_PATH/src/src/index.php" ] ; then cd "$DIR_PATH/src" git clone https://github.com/nukeviet/nukeviet.git ./ - git checkout nukeviet4.6 + git checkout nukeviet5.0 if ( (uname -s) 2>&1 ) | grep 'Linux' ; then find "$DIR_PATH/src" -name '.git' -type d -exec bash -c 'git config --global --add safe.directory ${0%/.git}' {} \; @@ -91,7 +91,7 @@ DB_READY=0 while [ $attempt -le 59 ]; do attempt=$(( $attempt + 1 )) echo "Đợi mariadb sẵn sàng (lần $attempt)..." - result=$( (docker logs db) 2>&1 ) + result=$( (docker logs nukeviet_db) 2>&1 ) if grep -q 'MariaDB init process done. Ready for start up' <<< $result ; then echo "MariaDB sẵn sàng!" DB_READY=1 @@ -115,7 +115,7 @@ NGINX_READY=0 while [ $attempt -le 59 ]; do attempt=$(( $attempt + 1 )) echo "Đợi nginx sẵn sàng (lần $attempt)..." - result=$( (docker logs nginx) 2>&1 ) + result=$( (docker logs nukeviet_nginx) 2>&1 ) if grep -q 'Configuration complete; ready for start up' <<< $result ; then echo "Nginx sẵn sàng!" NGINX_READY=1