-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
222 lines (204 loc) · 6.35 KB
/
docker-compose.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
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
services:
homer:
image: b4bz/homer
container_name: homer
restart: always
volumes:
- ./containers/homer/assets:/www/assets
ports:
- 13337:8080
environment:
- INIT_ASSETS=0
postgresql:
image: postgres:15
volumes:
- ./_data/db:/var/lib/postgresql/data
ports:
- 127.0.0.1:13100:5432
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
redis:
image: redis:7.2-alpine
# enables memory overcommit on reboot
# echo "vm.overcommit_memory = 1" | sudo tee /etc/sysctl.d/takaro-aio-memory-overcommit.conf
# sudo sysctl -w vm.overcommit_memory=1 (enables on-the-fly temporary)
# https://github.com/redis/docker-library-redis/issues/19#issuecomment-96080885
# Kernel docs: https://www.kernel.org/doc/Documentation/vm/overcommit-accounting
command: redis-server --maxmemory-policy noeviction
ports:
- 6379:6379
redis-insight:
image: redis/redisinsight:2.58
ports:
- "5540:5540"
volumes:
- ./_data/redis-insight:/data
takaro:
build:
context: .
dockerfile: ./containers/takaro/dev.Dockerfile
volumes:
- ./packages/app-api:/app/packages/app-api
- ./packages/app-connector:/app/packages/app-connector
- ./packages/app-mock-gameserver:/app/packages/app-mock-gameserver
- ./packages/web-main:/app/packages/web-main
- ./packages/web-docs:/app/packages/web-docs
- ./packages/lib-apiclient:/app/packages/lib-apiclient
- ./packages/lib-auth:/app/packages/lib-auth
- ./packages/lib-email:/app/packages/lib-email
- ./packages/lib-components:/app/packages/lib-components
- ./packages/lib-config:/app/packages/lib-config
- ./packages/lib-aws:/app/packages/lib-aws
- ./packages/lib-db:/app/packages/lib-db
- ./packages/lib-function-helpers:/app/packages/lib-function-helpers
- ./packages/lib-gameserver:/app/packages/lib-gameserver
- ./packages/lib-http:/app/packages/lib-http
- ./packages/lib-modules:/app/packages/lib-modules
- ./packages/lib-queues:/app/packages/lib-queues
- ./packages/lib-util:/app/packages/lib-util
- ./packages/test:/app/packages/test
- ./.storybook:/app/.storybook
- ./reports:/app/reports
- ./scripts:/app/scripts
env_file:
- .env
environment:
NODE_OPTIONS: '--loader ts-node/esm'
REDIS_HOST: redis
POSTGRES_HOST: postgresql
TAKARO_HOST: http://takaro:3000
TEST_HTTP_TARGET: http://takaro:3000
MAILHOG_URL: http://mailhog:8025
VITE_API: http://127.0.0.1:13000
VITE_ORY_URL: http://127.0.0.1:4433
VITE_POSTHOG_API_URL: ${VITE_POSTHOG_API_URL}
VITE_POSTHOG_PUBLIC_API_KEY: ${VITE_POSTHOG_PUBLIC_API_KEY}
CORS_ALLOWED_ORIGINS: http://127.0.0.1:13000,http://127.0.0.1:13001,http://127.0.0.1:13004,https://admin.socket.io,http://takaro:13000,http://takaro:13001
TRACING_ENDPOINT: 'http://tempo:4317'
TAKARO_SERVICE: 'dev-takaro'
ports:
# api
- 13000:3000
- 12001:12001
# web-main
- 13001:13001
# lib-components storybook
- 13002:13002
# mock server
- 13006:3002
- 12004:12004
# connector
- 12003:12003
# Docs
- 13005:13005
takaro-migrator:
build:
context: .
dockerfile: ./containers/takaro/dev.Dockerfile
command: npm -w packages/app-api run db:migrate
volumes:
- ./packages/app-api:/app/packages/app-api
- ./packages/lib-db:/app/packages/lib-db
- ./scripts:/app/scripts
env_file:
- .env
environment:
LOGGING_LEVEL: debug
NODE_OPTIONS: '--loader ts-node/esm'
POSTGRES_HOST: postgresql
e2e:
build:
context: .
dockerfile: containers/playwright/dev.Dockerfile
depends_on:
- takaro
ipc: host
volumes:
- ./packages/e2e:/app/packages/e2e
- /tmp/.X11-unix:/tmp/.X11-unix
ports:
- 20000:20000
environment:
- DISPLAY=:0
kratos-migrate:
image: oryd/kratos:v1.2.0
environment:
- DSN=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql_kratos:5432/kratos
volumes:
- ./containers/ory/kratos:/etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos:
image: oryd/kratos:v1.2.0
ports:
- '4433:4433' # public
- '4434:4434' # admin
restart: on-failure
environment:
- DSN=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql_kratos:5432/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- ./containers/ory/kratos:/etc/config/kratos
postgresql_kratos:
image: postgres:15
ports:
- 127.0.0.1:13101:5432
volumes:
- ./_data/kratos-db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: kratos
mailhog:
image: mailhog/mailhog
container_name: mailhog
ports:
# SMTP
# Doesnt need to be exposed outside the container network
# But keeping comment for 'documentation purposes'
# - 14000:1025
# Web
- 8025:8025
logging:
driver: none
prometheus:
image: prom/prometheus:v2.54.1
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
ports:
- 9090:9090
volumes:
- ./containers/prometheus:/etc/prometheus
- ./_data/prometheus:/prometheus
pushgateway:
image: prom/pushgateway
container_name: pushgateway
ports:
- "9091:9091"
grafana:
image: grafana/grafana:11.2.2
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
volumes:
- ./_data/grafana:/var/lib/grafana
ports:
- '13007:3000'
tempo:
image: grafana/tempo:latest
command: ['-config.file=/etc/tempo.yaml']
volumes:
- ./containers/tempo/tempo.yaml:/etc/tempo.yaml
- ./_data/tempo:/tmp/tempo
ports:
# - "14268:14268" # jaeger ingest
- '3200:3200' # tempo
- '4317:4317' # otlp grpc
# - "4318:4318" # otlp http
# - "9411:9411" # zipkin