You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.16-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./conf/nginx:/etc/nginx/conf.d
|
|
- ./conf/certbot/conf:/etc/letsencrypt
|
|
- ./conf/certbot/www:/var/www/certbot
|
|
- ./static_collected:/app/static_collected
|
|
- ./data/media:/app/data/media
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
|
depends_on:
|
|
- web
|
|
networks:
|
|
- nginx_network
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./conf/certbot/conf:/etc/letsencrypt
|
|
- ./conf/certbot/www:/var/www/certbot
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
|
|
|
web:
|
|
build: "."
|
|
links:
|
|
- "db:postgres"
|
|
volumes:
|
|
- ".:/app:rw"
|
|
- "./data:/data:rw"
|
|
- ./static_collected:/app/static_collected
|
|
- ./data/media:/app/data/media
|
|
networks:
|
|
- nginx_network
|
|
- db_network
|
|
command: "/bin/sh -c '/app/wait-for-postgres.sh postgres /app/run.sh'"
|
|
environment:
|
|
SECRET_KEY: "TEST---asdg4hr63453452542h4sdf25g42s3df54hj38rd4sg3f2d54h3sd5f4g53"
|
|
DEBUG: "False"
|
|
SENTRY_DSN: "https://460e310d034c49a794941e087c4fcc6e@sentry.io/1196285"
|
|
DEFAULT_HAYSTACK_URL: "es+https://tcjf1ngoog:qj70l67kk2@tagesschule-elementa-8329801232.eu-west-1.bonsaisearch.net/index-*"
|
|
DATABASE_URL: "postgres://postgres@postgres:5432/db"
|
|
db:
|
|
image: postgres:9.6-alpine
|
|
environment:
|
|
POSTGRES_DB: "db"
|
|
volumes:
|
|
- ".:/app:rw"
|
|
- "./pgdata:/var/lib/postgresql/data:rw"
|
|
networks:
|
|
- db_network
|
|
|
|
networks:
|
|
nginx_network:
|
|
driver: bridge
|
|
db_network:
|
|
driver: bridge |