-
Notifications
You must be signed in to change notification settings - Fork 126
/
docker-compose.prod.yaml
146 lines (136 loc) · 3.04 KB
/
docker-compose.prod.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
services:
db:
image: timescale/timescaledb:latest-pg14
restart: on-failure
expose:
- 5432
volumes:
- pgdata_prod:/var/lib/postgresql/data
env_file:
- ./env/.env.prod
svix-server:
image: svix/svix-server:v0.74
environment:
WAIT_FOR: "true"
SVIX_REDIS_DSN: redis://redis
SVIX_DB_DSN: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db
env_file:
- ./env/.env.prod
ports:
- "8071:8071"
depends_on:
- db
- redis
links:
- db
- redis
restart: on-failure
redpanda:
image: docker.redpanda.com/vectorized/redpanda:v22.2.2
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 0
- --kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
- --advertise-kafka-addr PLAINTEXT://redpanda:29092,OUTSIDE://localhost:9092
- --pandaproxy-addr 0.0.0.0:8082
- --advertise-pandaproxy-addr localhost:8082
expose:
- 8081
- 8082
- 9092
- 9644
- 29092
backend: &backend
env_file:
- ./env/.env.prod
build:
context: ./backend
dockerfile: Dockerfile
target: production
expose:
- 8000
volumes:
- django_static_volume:/lotus/staticfiles
command: sh -c "./scripts/start_backend.prod.sh"
depends_on:
- db
- redis
- redpanda
restart: on-failure
event-guidance:
env_file:
- ./env/.env.prod
build:
context: ./go/event-guidance
dockerfile: Dockerfile
expose:
- 7999
depends_on:
- db
- redis
- redpanda
restart: "on-failure:15"
event-ingestion:
env_file:
- ./env/.env.prod
build:
context: ./go/event-ingestion
dockerfile: Dockerfile
expose:
- 7998
depends_on:
- db
- redis
- redpanda
- backend
restart: "on-failure:15"
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
target: production
env_file:
- ./env/.env.prod
stdin_open: true
ports:
- 80:80
volumes:
- django_static_volume:/app/backend/server/django_staticfiles
depends_on:
- backend
redis:
image: redis:7-alpine
command: redis-server
env_file:
- ./env/.env.prod
celery:
env_file:
- ./env/.env.prod
build:
context: ./backend
dockerfile: Dockerfile
target: production
command: bash -c "while ! nc -q 1 db 5432 </dev/null; do sleep 5; done; celery -A lotus worker -l info;"
depends_on:
- redis
- backend
restart: on-failure
celery-beat:
env_file:
- ./env/.env.prod
restart: on-failure
build:
context: ./backend
dockerfile: Dockerfile
target: production
command: bash -c "while ! nc -q 1 db 5432 </dev/null; do sleep 5; done; celery -A lotus beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler;"
depends_on:
- celery
- backend
- redis
volumes:
pgdata_prod:
django_static_volume: