-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
209 lines (205 loc) · 5.12 KB
/
docker-compose.yaml
File metadata and controls
209 lines (205 loc) · 5.12 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
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
secrets:
aws-creds:
file: $HOME/.aws/credentials
configs:
dataall-config:
file: ./config.json
aws-config:
file: $HOME/.aws/config
services:
cdkproxy:
build:
context: ./
dockerfile: backend/docker/prod/ecs/Dockerfile
args:
CONTAINER_UID: ${UID}
PORT: '2805'
healthcheck:
test: [ "CMD", "curl", "-s", "http://localhost:2805" ]
interval: 60s
timeout: 10s
retries: 10
start_period: 20s
expose:
- 2805
ports:
- 2805:2805
depends_on:
db:
condition: service_healthy
migrations:
condition: service_completed_successfully
environment:
envname: 'dkrcompose'
config_location: "/config.json"
AWS_REGION: "${AWS_REGION:-eu-west-1}"
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION:-eu-west-1}"
secrets:
- source: aws-creds
target: /home/cuser/.aws/credentials
configs:
- source: aws-config
target: /home/cuser/.aws/config
- source: dataall-config
target: /config.json
develop:
watch:
- action: sync+restart
path: ./backend/dataall
target: /dataall
restart:
on-failure:60
platform:
linux/amd64
graphql-base:
entrypoint: 'true'
build:
context: ./
dockerfile: backend/docker/prod/lambda/Dockerfile
args:
CONTAINER_UID: ${UID}
graphql:
build:
context: ./
additional_contexts:
dataall-graphql-base: "service:graphql-base"
dockerfile_inline: |
FROM dataall-graphql-base
RUN python3.12 -m pip install uvicorn --prefix=/usr/local
entrypoint:
- "bash"
- "-c"
- "$${PYTHON_VERSION} -m uvicorn --reload --host 0.0.0.0 local_graphql_server:app --port 5000"
healthcheck:
test: [ "CMD", "curl", "-s", "http://localhost:5000/graphql" ]
interval: 60s
timeout: 10s
retries: 10
start_period: 20s
expose:
- 5000
ports:
- 5000:5000
environment:
envname: 'dkrcompose'
config_location: "/config.json"
AWS_REGION: "${AWS_REGION:-eu-west-1}"
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION:-eu-west-1}"
email_sender_id: "noreply@someawsdomain"
secrets:
- source: aws-creds
target: /home/cuser/.aws/credentials
configs:
- source: aws-config
target: /home/cuser/.aws/config
- source: dataall-config
target: /config.json
develop:
watch:
- action: sync
path: ./backend/dataall
target: /dataall
depends_on:
db:
condition: service_healthy
elasticsearch:
condition: service_healthy
cdkproxy:
condition: service_healthy
migrations:
condition: service_completed_successfully
restart:
on-failure:60
db:
image: postgres:16.4
environment:
POSTGRES_DB: 'dataall'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'docker'
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres", "-d", "dataall" ]
interval: 60s
timeout: 10s
retries: 10
start_period: 20s
expose:
- 5432
ports:
- 5432:5432
volumes:
- type: volume
target: /usr/share/postgresql/data
restart:
on-failure:60
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
healthcheck:
test: [ "CMD", "curl", "-s", "http://localhost:9200" ]
interval: 60s
timeout: 10s
retries: 10
start_period: 20s
volumes:
- type: volume
target: /usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: changeme
discovery.type: single-node
restart:
on-failure:60
frontend:
build:
context: .
dockerfile: frontend/docker/dev/Dockerfile
healthcheck:
test: [ "CMD", "node", "-e", "fetch('http://localhost:8080')" ]
interval: 60s
timeout: 10s
retries: 10
start_period: 60s
develop:
watch:
- action: sync
path: ./frontend
target: /app
deploy:
resources:
limits:
memory: 4096M
reservations:
memory: 128M
depends_on:
graphql:
condition: service_healthy
expose:
- "8080"
ports:
- "8080:8080"
migrations:
build:
context: ./
additional_contexts:
dataall-graphql-base: "service:graphql-base"
dockerfile_inline: |
FROM dataall-graphql-base
entrypoint: [ "alembic", "-c", "backend/alembic.ini", "upgrade", "head" ]
working_dir: /migrations/
environment:
envname: dkrcompose
PYTHONPATH: /migrations/backend
secrets:
- source: aws-creds
target: /home/cuser/.aws/credentials
configs:
- source: dataall-config
target: /migrations/config.json
volumes:
- ./backend:/migrations/backend
depends_on:
db:
condition: service_healthy