Production Ready
This commit is contained in:
@@ -3,13 +3,14 @@ version: '3.9'
|
||||
services:
|
||||
ref_test_server:
|
||||
container_name: ref_test_server
|
||||
image: nginx:1.21.4-alpine
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./certbot:/etc/letsencrypt:ro
|
||||
- ./nginx:/etc/nginx
|
||||
- ./src/html:/usr/share/nginx/html/
|
||||
- ./ref-test/admin/static:/usr/share/nginx/html/admin/static
|
||||
- ./ref-test/quiz/static:/usr/share/nginx/html/quiz/static
|
||||
- ./ref-test/app/admin/static:/usr/share/nginx/html/admin/static
|
||||
- ./ref-test/app/quiz/static:/usr/share/nginx/html/quiz/static
|
||||
- ./ref-test/app/root:/usr/share/nginx/html/root
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
@@ -18,6 +19,7 @@ services:
|
||||
- frontend
|
||||
depends_on:
|
||||
- ref_test_app
|
||||
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
||||
|
||||
ref_test_app:
|
||||
container_name: ref_test_app
|
||||
@@ -28,30 +30,14 @@ services:
|
||||
ports:
|
||||
- 5000
|
||||
volumes:
|
||||
- ./.security:/ref-test/.security
|
||||
- ./ref-test/data:/ref-test/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
depends_on:
|
||||
- ref_test_db
|
||||
- ref_test_postfix
|
||||
|
||||
ref_test_db:
|
||||
container_name: ref_test_db
|
||||
image: mongo:5.0.4-focal
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./database/data:/data/db
|
||||
- ./database/initdb.d/:/docker-entrypoint-initdb.d/
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- 27017
|
||||
networks:
|
||||
- backend
|
||||
|
||||
ref_test_postfix:
|
||||
container_name: ref_test_postfix
|
||||
image: catatnight/postfix:latest
|
||||
@@ -65,13 +51,11 @@ services:
|
||||
|
||||
ref_test_certbot:
|
||||
container_name: ref_test_certbot
|
||||
image: certbot/certbot:v1.21.0
|
||||
image: certbot/certbot
|
||||
volumes:
|
||||
- ./certbot:/etc/letsencrypt
|
||||
- ./src/html:/var/www/html
|
||||
depends_on:
|
||||
- ref_test_server
|
||||
# command: certonly --webroot --webroot-path=/var/www/html --email (email) --agree-tos --no-eff-email -d (domain)
|
||||
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
|
Reference in New Issue
Block a user