ska-referee-test/docker-compose.yml

71 lines
1.7 KiB
YAML
Raw Normal View History

version: '3.9'
volumes:
data:
services:
nginx:
2022-06-17 13:01:27 +01:00
container_name: reftest_server
2022-06-17 01:09:15 +01:00
image: nginx:alpine
volumes:
- ./certbot:/etc/letsencrypt:ro
- ./nginx:/etc/nginx
- ./src/html/certbot:/usr/share/nginx/html/certbot:ro
2022-08-18 17:07:48 +01:00
- ./src/html/robots.txt:/usr/share/nginx/html/robots.txt:ro
- ./ref-test/app/root:/usr/share/nginx/html/root:ro
- ./ref-test/app/admin/static:/usr/share/nginx/html/admin/static:ro
- ./ref-test/app/editor/static:/usr/share/nginx/html/editor/static:ro
- ./ref-test/app/quiz/static:/usr/share/nginx/html/quiz/static:ro
- ./ref-test/app/view/static:/usr/share/nginx/html/view/static:ro
ports:
- 80:80
- 443:443
restart: unless-stopped
networks:
- frontend
depends_on:
2022-06-17 12:58:46 +01:00
- app
2022-06-17 01:09:15 +01:00
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
app:
2022-06-17 13:01:27 +01:00
container_name: reftest_app
2021-12-07 16:03:56 +00:00
image: reftest
build: ./ref-test
env_file:
- ./.env
ports:
- 5000
2021-12-07 15:15:16 +00:00
volumes:
- data:/ref-test/data
- ./logs:/ref-test/data/logs
restart: unless-stopped
networks:
- frontend
- backend
depends_on:
2022-06-17 12:58:46 +01:00
- postfix
postfix:
2022-06-17 13:01:27 +01:00
container_name: reftest_postfix
image: catatnight/postfix:latest
restart: unless-stopped
env_file:
- ./.env
ports:
- 25
networks:
- backend
certbot:
2022-06-17 13:01:27 +01:00
container_name: reftest_certbot
2022-06-17 01:09:15 +01:00
image: certbot/certbot
volumes:
- ./certbot:/etc/letsencrypt
- ./src/html/certbot:/var/www/html
2022-06-17 01:09:15 +01:00
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
frontend:
external: false
backend:
external: false