-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (91 loc) · 2.31 KB
/
docker-compose.yml
File metadata and controls
95 lines (91 loc) · 2.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
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:16-alpine
container_name: devdeck-postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: devdeck
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# NestJS API
api:
build:
context: .
dockerfile: apps/api/Dockerfile
target: development
container_name: devdeck-api
restart: unless-stopped
ports:
- "4000:4000"
- "2525:2525" # SMTP port for DevInbox
environment:
NODE_ENV: development
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/devdeck
PORT: 4000
SMTP_PORT: 2525
SMTP_DOMAIN: devinbox.local
CORS_ORIGINS: http://localhost:4001,http://localhost:4000
volumes:
- ./apps/api:/app/apps/api
- ./packages:/app/packages
- /app/node_modules
- /app/apps/api/node_modules
depends_on:
postgres:
condition: service_healthy
command: pnpm --filter api start:dev
# Next.js Web Dashboard
web:
build:
context: .
dockerfile: apps/web/Dockerfile
target: development
container_name: devdeck-web
restart: unless-stopped
ports:
- "4001:4001"
environment:
NODE_ENV: development
NEXT_PUBLIC_API_URL: http://localhost:4000
volumes:
- ./apps/web:/app/apps/web
- ./packages:/app/packages
- /app/node_modules
- /app/apps/web/node_modules
- /app/apps/web/.next
command: pnpm --filter web dev
# Next.js Docs (Optional)
docs:
build:
context: .
dockerfile: apps/docs/Dockerfile
target: development
container_name: devdeck-docs
restart: unless-stopped
ports:
- "4002:4002"
environment:
NODE_ENV: development
NEXT_PUBLIC_API_URL: http://localhost:4000
volumes:
- ./apps/docs:/app/apps/docs
- ./packages:/app/packages
- /app/node_modules
- /app/apps/docs/node_modules
- /app/apps/docs/.next
command: pnpm --filter docs dev
profiles:
- full # Only start with --profile full
volumes:
postgres_data:
driver: local