-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (60 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
66 lines (60 loc) · 1.64 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
# Docker Compose — quick start using pre-built images from Docker Hub
# Usage: docker compose up -d
# make compose-up
#
# To build from source instead, use the build override:
# docker compose -f docker-compose.yml -f docker-compose.build.yml up --build -d
# make compose-build-up
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: refapp
POSTGRES_PASSWORD: refapp-lab-password
POSTGRES_DB: refapp
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./services/catalog/migrations/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U refapp -d refapp"]
interval: 5s
timeout: 3s
retries: 5
catalog:
image: schoolofdevops/refapp-catalog:1.0.0
environment:
DATABASE_URL: postgres://refapp:refapp-lab-password@postgres:5432/refapp
ports:
- "8081:8081"
depends_on:
postgres:
condition: service_healthy
worker:
image: schoolofdevops/refapp-worker:1.0.0
environment:
DATABASE_URL: postgres://refapp:refapp-lab-password@postgres:5432/refapp
ports:
- "8082:8082"
depends_on:
postgres:
condition: service_healthy
api-gateway:
image: schoolofdevops/refapp-gateway:1.0.0
environment:
CATALOG_URL: http://catalog:8081
WORKER_URL: http://worker:8082
ports:
- "8080:8080"
depends_on:
- catalog
- worker
dashboard:
image: schoolofdevops/refapp-dashboard:1.0.0
ports:
- "3000:3000"
depends_on:
- api-gateway
volumes:
pgdata: