This repository was archived by the owner on Nov 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
59 lines (59 loc) · 1.63 KB
/
docker-compose.prod.yml
File metadata and controls
59 lines (59 loc) · 1.63 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:
db:
image: postgres:16.3-alpine3.20
container_name: db
volumes:
- ./db_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
healthcheck:
test:
[
"CMD-SHELL",
"sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'",
]
interval: 10s
timeout: 5s
retries: 5
migrator:
build:
context: ./
dockerfile: Dockerfile.migrator
container_name: migrator
command: ["pnpm", "payload", "migrate"]
restart: no
environment:
- PAYLOAD_SECRET=${PAYLOAD_SECRET}
- DATABASE_URI=postgressql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${DB_PORT:-5432}/${POSTGRES_DB}
depends_on:
db:
condition: service_healthy
restart: true
cms:
build: ./apps/cms
container_name: cms
environment:
- PAYLOAD_SECRET=${PAYLOAD_SECRET}
- DATABASE_URI=postgressql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${DB_PORT:-5432}/${POSTGRES_DB}
depends_on:
migrator:
condition: service_completed_successfully
db:
condition: service_healthy
restart: true
web:
build: ./apps/web
container_name: web
environment:
- NODE_ENV=production
- ORIGIN=${ORIGIN}
- PAYLOAD_SECRET=${PAYLOAD_SECRET}
- DATABASE_URI=postgressql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${DB_PORT:-5432}/${POSTGRES_DB}
depends_on:
migrator:
condition: service_completed_successfully
db:
condition: service_healthy
restart: true