Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (87 loc) · 2.2 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
services:
postgres:
image: postgres:17-alpine
container_name: tariffshield-postgres
environment:
POSTGRES_DB: tariffshield
POSTGRES_USER: tariffshield
POSTGRES_PASSWORD: tariffshield_dev_password
ports:
- "5443:5432"
volumes:
- tariffshield_pg:/var/lib/postgresql/data
networks:
- tariffshield-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tariffshield -d tariffshield"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: tariffshield-redis
ports:
- "6379:6379"
networks:
- tariffshield-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
# Both Dockerfiles COPY sibling workspace packages (packages/sdk, the
# root package.json/package-lock.json) that only exist relative to the
# repo root, so the build context has to be the root, not the app dir.
context: .
dockerfile: apps/api/Dockerfile
container_name: tariffshield-api
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- apps/api/.env
environment:
DATABASE_URL: postgres://tariffshield:tariffshield_dev_password@postgres:5432/tariffshield
REDIS_URL: redis://redis:6379
ports:
- "3002:3002"
networks:
- tariffshield-net
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3002/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: tariffshield-web
depends_on:
api:
condition: service_healthy
environment:
NEXT_PUBLIC_API_URL: http://localhost:3002
ports:
- "3000:3000"
networks:
- tariffshield-net
jaeger:
image: jaegertracing/all-in-one:latest
container_name: tariffshield-jaeger
environment:
COLLECTOR_OTLP_ENABLED: "true"
ports:
- "16686:16686"
- "4318:4318"
networks:
- tariffshield-net
networks:
tariffshield-net:
driver: bridge
volumes:
tariffshield_pg: