-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 826 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
31 lines (31 loc) · 826 Bytes
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
services:
db:
image: postgres:16-alpine
ports:
- "5432:5432" # Changed from 5432:5432 to avoid port conflict
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- db_data:/var/lib/postgresql/data
restart: always
app:
build:
context: .
command: npm run dev
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- PORT=3000
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_RESEND_KEY=${AUTH_RESEND_KEY}
- MAILER_ADDRESS=${MAILER_ADDRESS}
volumes:
- .:/app # Mount current directory to /app in container
depends_on:
- db
volumes:
db_data: