-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (57 loc) · 1.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (57 loc) · 1.31 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
services:
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: pawacloud
POSTGRES_PASSWORD: pawacloud
POSTGRES_DB: pawacloud
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pawacloud"]
interval: 5s
timeout: 3s
retries: 3
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "8000:8000"
env_file: ./backend/.env
environment:
- ALLOWED_ORIGINS=["http://localhost:3000"]
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://pawacloud:pawacloud@postgres:5432/pawacloud
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3
frontend:
build: ./frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
depends_on:
backend:
condition: service_healthy
volumes:
pgdata: