61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
version: '2'
|
|
|
|
volumes:
|
|
postgres_data: {}
|
|
postgres_backup: {}
|
|
|
|
services:
|
|
postgres:
|
|
build: ./compose/postgres
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- postgres_backup:/backups
|
|
env_file: .env
|
|
|
|
django:
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
user: django
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: /gunicorn.sh
|
|
env_file: .env
|
|
|
|
nginx:
|
|
build: ./compose/nginx
|
|
depends_on:
|
|
- django
|
|
- certbot
|
|
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
|
|
environment:
|
|
- MY_DOMAIN_NAME=maidstone-hackspace.org.uk
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
- "0.0.0.0:443:443"
|
|
volumes:
|
|
- /etc/letsencrypt:/etc/letsencrypt
|
|
- /var/lib/letsencrypt:/var/lib/letsencrypt
|
|
|
|
certbot:
|
|
image: quay.io/letsencrypt/letsencrypt
|
|
command: bash -c "sleep 6 && certbot certonly -n --standalone -d maidstone-hackspace.org.uk --text --agree-tos --email support@maidstone-hackspace.org.uk --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --verbose --keep-until-expiring --standalone-supported-challenges http-01"
|
|
entrypoint: ""
|
|
volumes:
|
|
- /etc/letsencrypt:/etc/letsencrypt
|
|
- /var/lib/letsencrypt:/var/lib/letsencrypt
|
|
ports:
|
|
- "80"
|
|
- "443"
|
|
environment:
|
|
- TERM=xterm
|
|
|
|
|
|
redis:
|
|
image: redis:latest
|
|
|