forked from uselotus/lotus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
126 lines (117 loc) · 2.84 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
services:
db:
image: timescale/timescaledb-ha:pg14-latest
restart: on-failure
ports:
- 5433: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
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
- redpanda
event_consumer:
<<: *backend
ports:
- 7999:7999
command: sh -c "./scripts/start_consumer.sh"
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
restart: on-failure
celery-beat:
env_file:
- ./env/.env.dev
restart: on-failure
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 beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler;"
depends_on:
- celery
- backend
- redis
volumes:
pgdata_dev: