forked from bram2w/baserow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
197 lines (184 loc) · 6.44 KB
/
docker-compose.dev.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
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
version: "3.4"
services:
db:
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:${POSTGRES_PORT:-5432}:5432"
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:latest
environment:
- BASEROW_BACKEND_DEBUGGER_ENABLED=${BASEROW_BACKEND_DEBUGGER_ENABLED:-True}
- BASEROW_BACKEND_DEBUGGER_PORT=${BASEROW_BACKEND_DEBUGGER_PORT:-5678}
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
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:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
- ./deploy/plugins/install_plugin.sh:/baserow/plugins/install_plugin.sh
# 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:latest
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
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:3000:3000"
volumes:
- ./web-frontend:/baserow/web-frontend
# Override the above mounts for node_modules so we use the node_modules built
# directly into the image instead of whatever is on your local filesystem.
- /baserow/web-frontend/node_modules
- ./premium/web-frontend/:/baserow/premium/web-frontend
- ./enterprise/web-frontend/:/baserow/enterprise/web-frontend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
celery:
image: baserow_backend_dev:latest
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
command: "watch-py celery-worker"
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
# 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:latest
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- BASEROW_DANGEROUS_SILKY_ANALYZE_QUERIES
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
command: "watch-py celery-exportworker"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
# 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:latest
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
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
command: "watch-py celery-beat"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
- ./enterprise/backend/:/baserow/enterprise/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
mjml-email-compiler:
build:
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
context: .
dockerfile: ./web-frontend/Dockerfile
image: baserow_web-frontend:latest
command: "bash -c 'cd /baserow/backend/email_compiler/ && yarn install && yarn run watch'"
volumes:
- ./backend:/baserow/backend
# 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:
- "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:-1000}:${GID:-1000} -R /baserow/media
volumes:
- media:/baserow/media
- caddy_config:/config
- caddy_data:/data
networks:
local:
otel-collector:
image: otel/opentelemetry-collector
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"