-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.55 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
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: postscript-db
restart: unless-stopped
ports:
- '5433:5432'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postscript
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# NestJS API - Background scheduler
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: postscript-api
restart: unless-stopped
ports:
- '3000:3000'
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postscript?schema=public&connection_limit=10&pool_timeout=20
MAGIC_LINK_SECRET: ${MAGIC_LINK_SECRET}
RESEND_API_KEY: ${RESEND_API_KEY}
WEB_APP_URL: ${WEB_APP_URL:-http://localhost:3001}
NODE_ENV: production
depends_on:
postgres:
condition: service_healthy
# Next.js Web App
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: postscript-web
restart: unless-stopped
ports:
- '3001:3001'
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postscript?schema=public&connection_limit=10&pool_timeout=20
MAGIC_LINK_SECRET: ${MAGIC_LINK_SECRET}
RESEND_API_KEY: ${RESEND_API_KEY}
NODE_ENV: production
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data: