ska-referee-test/docker-compose.yml
2022-06-17 01:09:15 +01:00

64 lines
1.5 KiB
YAML

version: '3.9'
services:
ref_test_server:
container_name: ref_test_server
image: nginx:alpine
volumes:
- ./certbot:/etc/letsencrypt:ro
- ./nginx:/etc/nginx
- ./src/html:/usr/share/nginx/html/
- ./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
restart: unless-stopped
networks:
- 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
image: reftest
build: ./ref-test
env_file:
- ./.env
ports:
- 5000
volumes:
- ./ref-test/data:/ref-test/data
restart: unless-stopped
networks:
- frontend
- backend
depends_on:
- ref_test_postfix
ref_test_postfix:
container_name: ref_test_postfix
image: catatnight/postfix:latest
restart: unless-stopped
env_file:
- ./.env
ports:
- 25
networks:
- backend
ref_test_certbot:
container_name: ref_test_certbot
image: certbot/certbot
volumes:
- ./certbot:/etc/letsencrypt
- ./src/html:/var/www/html
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
frontend:
external: false
backend:
external: false