-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
53 lines (49 loc) · 1.57 KB
/
docker-compose.yaml
File metadata and controls
53 lines (49 loc) · 1.57 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
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: rust-template-db
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-EXAMPLE_POSTGRES_PASSWORD_DO_NOT_USE}
POSTGRES_DB: ${POSTGRES_DB:-app}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
jaeger:
image: jaegertracing/all-in-one:1.50
container_name: rust-template-jaeger
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:16686/"]
interval: 5s
timeout: 3s
retries: 5
app:
image: alpine:3.20
container_name: rust-template-app
command: ["sh", "-c", "tail -f /dev/null"]
environment:
HTTP_PORT: ${HTTP_PORT:-8080}
DATABASE_URL: ${DATABASE_URL:-postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-EXAMPLE_POSTGRES_PASSWORD_DO_NOT_USE}@postgres:5432/${POSTGRES_DB:-app}}
OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4317}
PLATFORM_AUTH_MODE: ${PLATFORM_AUTH_MODE:-open}
PLATFORM_AUTH_TOKEN: ${PLATFORM_AUTH_TOKEN:-dev-platform-token}
ports:
- "${HTTP_PORT:-8080}:${HTTP_PORT:-8080}"
depends_on:
- postgres
- jaeger
volumes:
postgres_data: