-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
58 lines (54 loc) · 1.28 KB
/
Copy pathcompose.yaml
File metadata and controls
58 lines (54 loc) · 1.28 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
name: pasteCTL_web
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- FRONTEND_URL=http://localhost:3000
- DATABASE_URL=postgres://user:password@db:5432/pastectl
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
db:
image: postgres:18-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: pastectl
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d pastectl"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_BACKEND_URL=http://localhost:8080
- NEXT_PUBLIC_WS_URL=ws://localhost:8080
environment:
- INTERNAL_BACKEND_URL=http://backend:8080
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata: