-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
75 lines (71 loc) · 1.67 KB
/
docker-compose.dev.yml
File metadata and controls
75 lines (71 loc) · 1.67 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
services:
# PostgreSQL Database
postgres:
image: postgres:16
environment:
POSTGRES_USER: taskosaur
POSTGRES_PASSWORD: taskosaur
POSTGRES_DB: taskosaur
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskosaur"]
interval: 10s
timeout: 5s
retries: 5
networks:
- taskosaur-network
# Redis for Bull Queue
redis:
image: redis:7
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- taskosaur-network
# Application (Backend + Frontend)
app:
build:
context: .
dockerfile: Dockerfile.dev
working_dir: /app
env_file:
- path: .env
required: false
environment:
# Override for Docker (uses service names instead of localhost)
DATABASE_URL: postgresql://taskosaur:taskosaur@postgres:5432/taskosaur
REDIS_HOST: redis
# Frontend environment variable for API connection
NEXT_PUBLIC_API_BASE_URL: http://localhost:3000/api
ports:
- "3000:3000" # Backend
- "3001:3001" # Frontend
volumes:
- .:/app
- /app/node_modules
- /app/backend/node_modules
- /app/frontend/node_modules
- app_uploads:/app/uploads
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- taskosaur-network
restart: unless-stopped
volumes:
postgres_data:
driver: local
redis_data:
driver: local
app_uploads:
driver: local
networks:
taskosaur-network:
driver: bridge