-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 1.42 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
version: '3.9'
services:
jaeger:
image: jaegertracing/opentelemetry-all-in-one:latest
ports:
- "3001:16686"
postgres:
networks:
- rust-http-starter
image: postgres
environment:
- POSTGRES_PASSWORD=root
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
# Comment in if you need redis
# redis:
# networks:
# - rust-http-starter
# image: "redis:6-alpine"
# ports:
# - 6379:6379
# healthcheck:
# test: [ "CMD", "redis-cli", "ping" ]
# interval: 5s
# timeout: 5s
# retries: 5
rust-http-starter:
networks:
- rust-http-starter
build:
dockerfile: ./Dockerfile-dev
context: .
depends_on:
jaeger:
condition: service_started
postgres:
condition: service_healthy
# redis:
# condition: service_healthy
ports:
- "3000:3000"
environment:
- PORT=3000
- LOG_LEVEL=INFO
- DATABASE_URL=postgres://postgres:root@postgres:5432/postgres
- TELEMETRY_ENABLED=true
- TELEMETRY_GRPC_URL=http://jaeger:4317
- ATTESTATION_CACHE_URL=redis://redis:6379/0
volumes:
- ./:/rust-http-starter/
healthcheck:
test: [ "CMD", "curl", "localhost:3000/health" ]
interval: 5s
timeout: 5s
retries: 5
networks:
rust-http-starter:
ipam:
driver: default