Skip to content

Commit

Permalink
cm 2
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Dec 2, 2023
1 parent df36c80 commit f3d0dd2
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 7 deletions.
20 changes: 13 additions & 7 deletions docker-configs/docker-compose.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ services:
image: mongo:6.0.2
container_name: mongo
restart: always
environment:
- TZ=Asia/Ho_Chi_Minh
volumes:
- ./dbdata:/data/db
- ./mongobackups:/var/backups/mongobackups
ports:
- 27017:27017
networks:
- paasnet
- creportnet

nginx:
image: FRONTEND_MAINNET_TAG
container_name: nginx
ports:
- 80:80
- 443:443
environment:
- TZ=Asia/Ho_Chi_Minh
#env_file:
# - .env
restart: always
Expand All @@ -29,17 +33,19 @@ services:
- ./certbot/conf/:/etc/nginx/ssl/:ro
command: "/bin/sh -c 'while :; do sleep 24h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- paasnet
- creportnet

certbot:
image: certbot/certbot:latest
container_name: certbot
environment:
- TZ=Asia/Ho_Chi_Minh
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 24h & wait $${!}; done;'"
networks:
- paasnet
- creportnet

api:
image: API_MAINNET_TAG
Expand All @@ -48,14 +54,14 @@ services:
- 3000:3000
restart: always
environment:
- TZ=Asia/Ho_Chi_Minh # for ex : "Asia/Ho_Chi_Minh"
- TZ=Asia/Ho_Chi_Minh
env_file:
- .env
command: "/bin/sh -c 'cd /app/api ; node dist/main'"
networks:
- paasnet
- creportnet

networks:
paasnet:
name: paasnet
creportnet:
name: creportnet
driver: bridge
67 changes: 67 additions & 0 deletions docker-configs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: '3'

services:
mongo:
image: mongo:6.0.2
container_name: mongo
restart: always
environment:
- TZ=Asia/Ho_Chi_Minh
volumes:
- ./dbdata:/data/db
- ./mongobackups:/var/backups/mongobackups
ports:
- 27017:27017
networks:
- creportnet

nginx:
image: nginx
container_name: nginx
ports:
- 80:80
- 443:443
environment:
- TZ=Asia/Ho_Chi_Minh
#env_file:
# - .env
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d/:/etc/nginx/conf.d/
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
command: "/bin/sh -c 'while :; do sleep 24h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- creportnet

certbot:
image: certbot/certbot:latest
container_name: certbot
environment:
- TZ=Asia/Ho_Chi_Minh
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 24h & wait $${!}; done;'"
networks:
- creportnet

api:
image: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/creport:api-mainnet-1.0.0
container_name: api
ports:
- 3000:3000
restart: always
environment:
- TZ=Asia/Ho_Chi_Minh
env_file:
- .env
command: "/bin/sh -c 'cd /app/api ; node dist/main'"
networks:
- creportnet

networks:
creportnet:
name: creportnet
driver: bridge

0 comments on commit f3d0dd2

Please sign in to comment.