forked from baserow/baserow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
287 lines (272 loc) · 8.85 KB
/
docker-compose.dev.yml
File metadata and controls
287 lines (272 loc) · 8.85 KB
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
services:
db:
# use lowest supported version for dev to check compatibility
image: pgvector/pgvector:pg${POSTGRES_IMAGE_VERSION:-14}
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:${POSTGRES_PORT:-5432}:5432"
command: "${POSTGRES_DEV_EXTRA_ARGS}"
volumes:
# Use a different volume in case the Major version is different from the
# production one to avoid issues.
- pgdatadev:/var/lib/postgresql/data
redis:
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:${DEBUG_REDIS_PORT:-6379}:6379"
# Override with the dev caddy file which switches Caddy to only be the media file
# server in the dev env. Devs will instead directly connect to the backend and
# web frontend services.
caddy:
volumes:
- $PWD/Caddyfile.dev:/etc/caddy/Caddyfile
backend:
image: baserow_backend:dev
environment:
- BASEROW_BACKEND_DEBUGGER_ENABLED
- BASEROW_BACKEND_DEBUGGER_PORT=${BASEROW_BACKEND_DEBUGGER_PORT:-5678}
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- BASEROW_EMBEDDINGS_API_URL=${BASEROW_EMBEDDINGS_API_URL}
build:
dockerfile: ./backend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:8000:8000"
- "${HOST_PUBLISH_IP:-127.0.0.1}:${BASEROW_BACKEND_DEBUGGER_PORT:-5678}:${BASEROW_BACKEND_DEBUGGER_PORT:-5678}"
volumes:
- ./docs:/baserow/docs
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins/:/baserow/plugins/
- ./tests:/baserow/tests
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
depends_on:
- otel-collector
web-frontend:
image: baserow_web-frontend:dev
build:
dockerfile: ./web-frontend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
command: "nuxt-dev"
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:3000:3000"
volumes:
- ./web-frontend:/baserow/web-frontend
- ./premium/web-frontend/:/baserow/premium/web-frontend
- ./enterprise/web-frontend/:/baserow/enterprise/web-frontend
- ./tests/:/baserow/tests
- ./deploy/plugins:/baserow/plugins
# dev volumes to avoid polluting your local filesystem with build files or
# overwriting existing node_modules.
- node_modules:/baserow/web-frontend/node_modules
- nuxt:/baserow/web-frontend/.nuxt/
- cache:/baserow/web-frontend/.cache/
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
storybook:
image: baserow_web-frontend:dev
profiles: ["optional"]
build:
dockerfile: ./web-frontend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
command: "storybook-dev"
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:6006:6006"
volumes:
- ./web-frontend:/baserow/web-frontend
- ./premium/web-frontend/:/baserow/premium/web-frontend
- ./enterprise/web-frontend/:/baserow/enterprise/web-frontend
- ./tests/:/baserow/tests
- ./deploy/plugins:/baserow/plugins
# dev volumes to avoid polluting your local filesystem with build files or
# overwriting existing node_modules.
- node_modules:/baserow/web-frontend/node_modules
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:6006/"]
interval: 60s
timeout: 5s
retries: 3
start_period: 30s
celery:
image: baserow_backend:dev
user: "${UID}:${GID}"
command: "watch-py celery-worker"
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
volumes:
- ./docs:/baserow/docs
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins:/baserow/plugins
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
depends_on:
- otel-collector
celery-export-worker:
image: baserow_backend:dev
user: "${UID}:${GID}"
command: "watch-py celery-exportworker"
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
volumes:
- ./docs:/baserow/docs
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins:/baserow/plugins
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
depends_on:
- otel-collector
celery-beat-worker:
image: baserow_backend:dev
user: "${UID}:${GID}"
command: "watch-py celery-beat"
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins:/baserow/plugins
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
celery-flower:
image: baserow_backend:dev
user: "${UID}:${GID}"
profiles: ["optional"]
restart: unless-stopped
stop_signal: SIGQUIT
command: "celery-flower"
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:5555 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
environment:
REDIS_HOST:
REDIS_PORT:
REDIS_PROTOCOL:
REDIS_URL:
REDIS_SSL_CERT_REQS:
REDIS_SSL_CA_CERTS:
REDIS_USER:
REDIS_PASSWORD: ${REDIS_PASSWORD:?}
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins:/baserow/plugins
- media:/baserow/media
ports:
- "5555:5555" # web ui
networks:
local:
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
mjml-email-compiler:
image: baserow_web-frontend:dev
depends_on:
- web-frontend
user: "${UID}:${GID}"
command: "bash -c 'cd /baserow/backend/email_compiler/ && yarn install && yarn run watch'"
healthcheck:
disable: true
volumes:
- ./backend:/baserow/backend
- ./web-frontend/docker:/baserow/web-frontend/docker
- ./deploy/plugins:/baserow/plugins
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
mailhog:
image: mailhog/mailhog
logging:
driver: "none" # disable saving logs
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:1025:1025" # smtp
- "8025:8025" # web ui
networks:
local:
# When switching between dev and local the media files in the media volume will be
# owned by different users. Ensure that we chown them to the user appropriate for the
# environment here.
volume-permissions-fixer:
image: bash:4.4
command: chown ${UID:-9999}:${GID:-9999} -R /baserow/media
volumes:
- media:/baserow/media
- caddy_config:/config
- caddy_data:/data
networks:
local:
otel-collector:
image: otel/opentelemetry-collector:0.106.1
command: ["--config=/etc/otel-collector-config.yaml"]
environment:
HONEYCOMB_API_KEY:
HONEYCOMB_METRICS_DATASET: baserow-dev-metrics
volumes:
- $PWD/deploy/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml
networks:
local:
ports:
- "4318:4318"
embeddings:
profiles: ["ai"]
build:
context: ./embeddings
dockerfile: Dockerfile
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:7999:80"
networks:
local:
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import requests; requests.get('http://localhost/health').raise_for_status()",
]
interval: 1m30s
timeout: 10s
retries: 3
volumes:
pgdatadev:
node_modules:
nuxt:
storybook:
cache: