From 11f2f523d89a556366dda55070edea6128f7bbcb Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Mon, 6 Dec 2021 13:39:06 +0000 Subject: [PATCH] Added Certbot and Nginx to Docker stack --- docker-compose.yml | 50 ++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6d92923..116a049 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: