2021-12-07 13:26:24 +00:00
|
|
|
version: '3.9'
|
|
|
|
|
|
|
|
services:
|
2022-06-17 02:00:37 +01:00
|
|
|
nginx:
|
2022-06-17 13:01:27 +01:00
|
|
|
container_name: reftest_server
|
2022-06-17 01:09:15 +01:00
|
|
|
image: nginx:alpine
|
2021-12-07 13:26:24 +00:00
|
|
|
volumes:
|
|
|
|
- ./certbot:/etc/letsencrypt:ro
|
|
|
|
- ./nginx:/etc/nginx
|
|
|
|
- ./src/html:/usr/share/nginx/html/
|
2022-06-22 11:18:53 +01:00
|
|
|
- ./ref-test/app/editor/static:/usr/share/nginx/html/admin/editor/static
|
2022-06-17 01:09:15 +01:00
|
|
|
- ./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
|
2021-12-07 13:26:24 +00:00
|
|
|
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;\"'"
|
2021-12-07 13:26:24 +00:00
|
|
|
|
2022-06-17 02:00:37 +01:00
|
|
|
app:
|
2022-06-17 13:01:27 +01:00
|
|
|
container_name: reftest_app
|
2021-12-07 16:03:56 +00:00
|
|
|
image: reftest
|
2021-12-07 13:26:24 +00:00
|
|
|
build: ./ref-test
|
|
|
|
env_file:
|
|
|
|
- ./.env
|
|
|
|
ports:
|
|
|
|
- 5000
|
2021-12-07 15:15:16 +00:00
|
|
|
volumes:
|
2021-12-07 15:52:58 +00:00
|
|
|
- ./ref-test/data:/ref-test/data
|
2021-12-07 13:26:24 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
2022-06-17 12:58:46 +01:00
|
|
|
- postfix
|
2021-12-07 13:26:24 +00:00
|
|
|
|
2022-06-17 02:00:37 +01:00
|
|
|
postfix:
|
2022-06-17 13:01:27 +01:00
|
|
|
container_name: reftest_postfix
|
2021-12-07 13:26:24 +00:00
|
|
|
image: catatnight/postfix:latest
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
|
|
- ./.env
|
|
|
|
ports:
|
|
|
|
- 25
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
2022-06-17 02:00:37 +01:00
|
|
|
certbot:
|
2022-06-17 13:01:27 +01:00
|
|
|
container_name: reftest_certbot
|
2022-06-17 01:09:15 +01:00
|
|
|
image: certbot/certbot
|
2021-12-07 13:26:24 +00:00
|
|
|
volumes:
|
|
|
|
- ./certbot:/etc/letsencrypt
|
|
|
|
- ./src/html:/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;'"
|
2021-12-07 13:26:24 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
frontend:
|
|
|
|
external: false
|
|
|
|
backend:
|
|
|
|
external: false
|