Added Certbot and Nginx to Docker stack

This commit is contained in:
Vivek Santayana 2021-12-06 13:39:06 +00:00
parent 7323bd2885
commit 11f2f523d8

View File

@ -1,23 +1,23 @@
version: '3.9'
services:
# ref_test_server:
# container_name: ref_test_server
# image: nginx:1.21.4-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
# ports:
# - 80:80
# - 443:443
# restart: unless-stopped
# networks:
# - frontend
# depends_on:
# - ref_test_app
ref_test_server:
container_name: ref_test_server
image: nginx:1.21.4-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
ports:
- 80:80
- 443:443
restart: unless-stopped
networks:
- frontend
depends_on:
- ref_test_app
ref_test_app:
container_name: ref_test_app
@ -27,7 +27,7 @@ services:
env_file:
- ./.env
ports:
- 5000:5000
- 5000
restart: unless-stopped
networks:
- frontend
@ -61,12 +61,14 @@ services:
networks:
- backend
# ref_test_certbot:
# container_name: ref_test_certbot
# image: certbot/certbot:v1.21.0
# volumes:
# - ./certbot:/etc/letsencrypt
# -
ref_test_certbot:
container_name: ref_test_certbot
image: certbot/certbot:v1.21.0
volumes:
- ./certbot:/etc/letsencrypt
- ./src/html:/var/www/html
depends_on:
- ref_test_server
networks: