-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
211 lines (198 loc) · 5.33 KB
/
docker-compose.yaml
File metadata and controls
211 lines (198 loc) · 5.33 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
version: "3"
x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
services:
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
command: ["--config=/etc/config.yaml"]
volumes:
- ./development-environment/otel-collector/config.yaml:/etc/config.yaml
ports:
- "4317:4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464:9464" # Prometheus exporter
- "8888:8888" # metrics endpoint
networks:
- dev
depends_on:
jaeger:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/metrics"]
interval: 30s
timeout: 10s
retries: 3
logging: *logging
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268:14268"
environment:
- COLLECTOR_OTLP_ENABLED=true
- LOG_LEVEL=debug
networks:
- dev
logging: *logging
prometheus:
image: prom/prometheus:latest
volumes:
- ./development-environment/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- dev
logging: *logging
postgres:
image: postgres:17-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=taskflow_db
- POSTGRES_MULTIPLE_DATABASES=keycloak
volumes:
- ./development-environment/database/init-multiple-databases.sh:/docker-entrypoint-initdb.d/init-multiple-databases.sh:ro
networks:
- dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
logging: *logging
keycloak:
image: quay.io/keycloak/keycloak:25.0
ports:
- "8080:8080"
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: postgres
KC_DB_PASSWORD: postgres
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HTTP_ENABLED: "true"
KC_HOSTNAME_STRICT: "false"
KC_HOSTNAME_STRICT_HTTPS: "false"
command:
- start-dev
- --import-realm
volumes:
- ./development-environment/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro
networks:
- dev
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /realms/master HTTP/1.1\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && grep -q '200 OK' <&3"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
logging: *logging
redis:
image: redis:alpine
ports:
- "6379:6379"
networks:
- dev
logging: *logging
localstack:
image: localstack/localstack:3.1
ports:
- "127.0.0.1:4510-4559:4510-4559"
- "127.0.0.1:4566:4566"
environment:
- DEBUG=${DEBUG:-0}
- SERVICES=sns,sqs
- DISABLE_CORS_CHECKS=1
- DISABLE_CORS_HANDLERS=1
- SKIP_CORS_PREFLIGHT=1
- CORS_ALLOW_ORIGIN=*
- CORS_EXPOSE_HEADERS=*
- EXTRA_CORS_ALLOWED_ORIGINS=*
- EXTRA_CORS_ALLOWED_HEADERS=*
- EXTRA_CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,HEAD,OPTIONS
volumes:
- "${TMPDIR:-/tmp}/localstack:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- ./development-environment/localstack:/etc/localstack/init/ready.d
networks:
- dev
logging: *logging
localstack-web:
image: dantasrafael/localstack-web:0.0.1
ports:
- "3000:3000"
environment:
- VITE_LOCALSTACK_ENDPOINT=http://localhost:4566
- VITE_AWS_DEFAULT_REGION=us-east-1
- VITE_AWS_ACCESS_KEY_ID=test
- VITE_AWS_SECRET_ACCESS_KEY=test
depends_on:
- localstack
networks:
- dev
logging: *logging
nginx:
image: openresty/openresty:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./development-environment/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
- ./development-environment/nginx/auth.lua:/usr/local/openresty/nginx/conf/auth.lua:ro
networks:
- dev
depends_on:
keycloak:
condition: service_healthy
taskflow-service:
condition: service_started
logging: *logging
taskflow-service:
image: taskflow-service
ports:
- "8081:8081"
environment:
ENVIRONMENT: development
APP_NAME: taskflow-service
APP_TYPE: service
PORT: 8081
CLOUD: aws
CLOUD_PROJECT_ID: XYZ
CLOUD_HOST: http://localstack:4566
CLOUD_REGION: us-east-1
CLOUD_SECRET: no_secret
CLOUD_TOKEN: no_token
CLOUD_DISABLE_SSL: "true"
SQL_DB_HOST: postgres
SQL_DB_PORT: 5432
SQL_DB_USER: postgres
SQL_DB_PASSWORD: postgres
SQL_DB_NAME: taskflow_db
SQL_DB_SSL_MODE: disable
SQL_DB_MIGRATION: "true"
CACHE_URI: redis:6379
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4318
OTEL_EXPORTER_OTLP_PROTOCOL: http
OTEL_SERVICE_NAME: taskflow-service
networks:
- dev
depends_on:
postgres:
condition: service_healthy
localstack:
condition: service_healthy
logging: *logging
networks:
dev:
volumes:
pgdata: