-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
88 lines (82 loc) · 1.69 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
88 lines (82 loc) · 1.69 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
x-common-env: &commonEnv
POSTGRES_USER: keryx
POSTGRES_PASSWORD: keryx
POSTGRES_DB: keryx
# backend-specific
WEB_SERVER_PORT: 8080
WEB_SERVER_HOST: 0.0.0.0
WEB_SERVER_ALLOWED_ORIGINS: "http://localhost:3000"
DATABASE_URL: postgresql://keryx:keryx@db:5432/keryx
REDIS_URL: redis://redis:6379
# frontend-specific
NEXT_PUBLIC_API_URL: http://localhost:8080
services:
db:
image: postgres:15
restart: always
environment:
<<: *commonEnv
# ports:
# - "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "keryx", "-d", "keryx"]
interval: 1s
timeout: 5s
retries: 10
networks:
- keryx_internal
redis:
image: redis:6
restart: always
# ports:
# - "6379:6379"
environment:
<<: *commonEnv
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "--raw", "ping"]
interval: 1s
timeout: 5s
retries: 10
networks:
- keryx_internal
backend:
build:
context: ./backend
dockerfile: Dockerfile
args:
<<: *commonEnv
environment:
<<: *commonEnv
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- keryx_internal
- keryx_external
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
<<: *commonEnv
environment:
<<: *commonEnv
ports:
- "3000:3000"
networks:
- keryx_internal
- keryx_external
volumes:
db_data:
redis_data:
networks:
keryx_internal:
keryx_external: