Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cài đặt nukeviet5.0 trên docker #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions 4.6-nginx/docker-compose.yml → 5.0-nginx/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -51,7 +51,7 @@ services:
- 8443:443
networks:
nukeviet:
ipv4_address: 172.18.5.3
ipv4_address: 172.20.5.3
depends_on:
- nukeviet

Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions 4.6-nginx/setup.sh → 5.0-nginx/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}' {} \;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down