wedding-site-backend/compose.prod.yaml

52 lines
1.1 KiB
YAML
Raw Normal View History

2024-02-18 14:09:12 +00:00
version: '3.8'
services:
web:
build: ./wedding_site
command: gunicorn wedding_site.wsgi:application --bind 0.0.0.0:8000
volumes:
- ./wedding_site/:/usr/src/app/
- static_volume:/staticfiles
2024-02-18 14:25:20 +00:00
- media_volume:/mediafiles
2024-02-18 14:09:12 +00:00
expose:
- 8000
env_file:
- ./.env.prod
2024-02-18 17:20:38 +00:00
nginx-proxy:
container_name: nginx-proxy
2024-02-18 14:09:12 +00:00
build: ./nginx
2024-02-18 17:20:38 +00:00
restart: always
2024-02-18 14:09:12 +00:00
ports:
2024-02-18 17:20:38 +00:00
- 443:443
- 80:80
2024-02-18 14:09:12 +00:00
volumes:
- static_volume:/staticfiles
2024-02-18 14:25:20 +00:00
- media_volume:/mediafiles
2024-02-18 17:20:38 +00:00
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
2024-02-18 14:09:12 +00:00
depends_on:
- web
2024-02-18 17:20:38 +00:00
acme-companion:
image: docker.io/nginxproxy/acme-companion
env_file:
- ./.env.prod.proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- acme:/etc/acme.sh
depends_on:
- nginx-proxy
2024-02-18 14:09:12 +00:00
volumes:
2024-02-18 14:25:20 +00:00
static_volume:
2024-02-18 17:20:38 +00:00
media_volume:
certs:
html:
vhost:
acme: