-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (90 loc) · 2.28 KB
/
docker-compose.yml
File metadata and controls
95 lines (90 loc) · 2.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
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
89
90
91
92
93
94
95
services:
# PostgreSQL Database
postgres:
image: postgres:17-alpine
container_name: taskflow-postgres
restart: unless-stopped
environment:
POSTGRES_USER: taskflow_user
POSTGRES_PASSWORD: taskflow_pass
POSTGRES_DB: taskflow_db
ports:
- "5436:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- taskflow-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskflow_user -d taskflow_db"]
interval: 10s
timeout: 5s
retries: 5
# pgAdmin Database Management
pgadmin:
image: dpage/pgadmin4:9
container_name: taskflow-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5056:80"
depends_on:
postgres:
condition: service_healthy
networks:
- taskflow-network
# Nest.js Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: development
container_name: taskflow-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://taskflow_user:taskflow_pass@postgres:5432/taskflow_db
JWT_SECRET: your-super-secret-jwt-key-min-32-characters-change-in-production
JWT_EXPIRES_IN: 7d
PORT: 3001
NODE_ENV: development
FRONTEND_URL: http://localhost:3002
ports:
- "3001:3001"
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
networks:
- taskflow-network
command: sh -c "npx prisma migrate deploy && npx prisma db seed && npm run start:dev"
# Next.js Frontend Application
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: development
container_name: taskflow-frontend
restart: unless-stopped
environment:
NEXT_PUBLIC_API_URL: http://localhost:3001
NEXT_TELEMETRY_DISABLED: 1
PORT: 3002
ports:
- "3002:3002"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
networks:
- taskflow-network
volumes:
postgres_data:
networks:
taskflow-network:
driver: bridge