-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (68 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
76 lines (68 loc) · 1.54 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
version: "3.9"
services:
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-app_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-app_password}
POSTGRES_DB: ${POSTGRES_DB:-app_db}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 10
pgadmin:
image: dpage/pgadmin4:8
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "8081:80"
depends_on:
postgres:
condition: service_healthy
redis:
image: redis:7
restart: unless-stopped
ports:
- "6379:6379"
gateway-api:
build: ./services/gateway-api
env_file: .env
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000"
users-api:
build: ./services/users-api
env_file: .env
depends_on:
postgres:
condition: service_healthy
ports:
- "8001:8000"
items-api:
build: ./services/items-api
env_file: .env
depends_on:
postgres:
condition: service_healthy
ports:
- "8002:8000"
web-app:
build: ./frontend/web-app
env_file: .env
depends_on:
- gateway-api
ports:
- "5173:5173"
volumes:
pg_data: