-
Notifications
You must be signed in to change notification settings - Fork 126
/
docker-compose.dev.yaml
158 lines (148 loc) · 3.52 KB
/
docker-compose.dev.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
147
148
149
150
151
152
153
154
155
156
157
158
services:
db:
image: timescale/timescaledb-ha:pg14-latest
restart: on-failure
ports:
- 5432:5432
volumes:
- pgdata_dev:/var/lib/postgresql/data
env_file:
- ./env/.env.dev
redis:
image: redis:7-alpine
command: redis-server
env_file:
- ./env/.env.dev
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
ports:
- 8081:8081
- 8082:8082
- 9092:9092
- 9644:9644
- 29092:29092
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.dev
ports:
- "8071:8071"
depends_on:
- db
- redis
links:
- db
- redis
restart: on-failure
backend:
&backend
env_file:
- ./env/.env.dev
build:
context: ./backend
dockerfile: Dockerfile
target: development
ports:
- 8000:8000
volumes:
- ./backend/lotus:/lotus/lotus
- ./backend/metering_billing:/lotus/metering_billing
- ./backend/api:/lotus/api
command: sh -c "./scripts/start_backend.dev.sh"
depends_on:
- db
- redis
event-guidance:
env_file:
- ./env/.env.dev
build:
context: ./go/event-guidance
dockerfile: Dockerfile
ports:
- 7999:7999
depends_on:
- db
- redis
- redpanda
- backend
restart: "on-failure:15"
event-ingestion:
env_file:
- ./env/.env.dev
build:
context: ./go/event-ingestion
dockerfile: Dockerfile
ports:
- 7998:7998
depends_on:
- db
- redis
- redpanda
- backend
restart: "on-failure:15"
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
target: development
env_file:
- ./env/.env.dev
ports:
- 3000:3000
command: yarn run dev --host 0.0.0.0 --port 3000
volumes:
- ./frontend/src:/frontend/src:delegated
- ./frontend/public:/frontend/public:delegated
- /frontend/node_modules/
stdin_open: true
depends_on:
- backend
celery:
env_file:
- ./env/.env.dev
build:
context: ./backend
dockerfile: Dockerfile
target: development
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
volumes:
- ./backend/lotus:/lotus/lotus
- ./backend/metering_billing:/lotus/metering_billing
- ./backend/api:/lotus/api
restart: on-failure
celery-beat:
env_file:
- ./env/.env.dev
restart: on-failure
build:
context: ./backend
dockerfile: Dockerfile
target: development
volumes:
- ./backend/lotus:/lotus/lotus
- ./backend/metering_billing:/lotus/metering_billing
- ./backend/api:/lotus/api
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_dev: