-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
65 lines (57 loc) · 1.58 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3'
volumes:
traefik_acme: {}
rabbitmq_data: {}
postgres_data: {}
services:
rabbitmq:
env_file: .env-prod
restart: always
image: rabbitmq:latest
ports:
- 5672
volumes:
- rabbitmq_data:/data
postgres:
env_file: .env-prod
restart: always
image: postgres:latest
ports:
- 5432
volumes:
- postgres_data:/var/lib/postgresql/data/
worker: &worker
env_file: .env-prod
restart: always
build: .
command: celery -A config.celery_app worker -l debug
links:
- rabbitmq:rabbitmq
- postgres:postgres
beat:
<<: *worker
command: celery -A config.celery_app beat -l debug
backend:
<<: *worker
command: gunicorn config.wsgi:application -b :${BACKEND_PORT}
expose:
- ${BACKEND_PORT}
labels:
- traefik.enable=true
- traefik.backend.domain=${BACKEND_DOMAIN}
- traefik.frontend.rule=Host:${BACKEND_DOMAIN}
- traefik.http.middlewares.testHeader.Headers.AddVaryHeader=true
- traefik.http.middlewares.testHeader.Headers.AccessControlMaxAge=100
- traefik.http.middlewares.testHeader.Headers.AccessControlAllowMethods=GET,OPTIONS,PUT,POST,DELETE,PATCH
- traefik.http.middlewares.testHeader.Headers.AccessControlAllowOrigin=*.${BACKEND_DOMAIN},${BACKEND_DOMAIN}
traefik:
env_file: .env-prod
build: traefik
depends_on:
- backend
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik_acme:/etc/traefik/acme/ # Defined in traefik/traefik.toml
ports:
- 0.0.0.0:80:80
- 0.0.0.0:443:443