-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.staging.yml
More file actions
123 lines (116 loc) · 4.28 KB
/
docker-compose.staging.yml
File metadata and controls
123 lines (116 loc) · 4.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Staging environment compose file -- mirrors production topology (#108).
#
# Usage:
# docker compose -f docker-compose.staging.yml up -d --build
#
# This file maintains parity with docker-compose.yml (production) so that
# staging validates the same service topology, networking, and health checks
# before promotion to production.
services:
postgres:
image: postgres:16-alpine
container_name: patchwork-staging-postgres
restart: unless-stopped
environment:
POSTGRES_DB: patchwork
POSTGRES_USER: patchwork
POSTGRES_PASSWORD: ${PATCHWORK_STAGING_POSTGRES_PASSWORD:?Set PATCHWORK_STAGING_POSTGRES_PASSWORD in .env}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U patchwork -d patchwork']
interval: 5s
timeout: 3s
retries: 20
volumes:
- patchwork-staging-postgres-data:/var/lib/postgresql/data
networks:
staging-internal:
patchwork-api:
build:
context: .
dockerfile: Dockerfile
target: api-runtime
container_name: patchwork-staging-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: production
PATCHWORK_ENV: staging
LOG_LEVEL: ${LOG_LEVEL:-info}
ATPROTO_SERVICE_DID: ${STAGING_ATPROTO_SERVICE_DID:?Set STAGING_ATPROTO_SERVICE_DID in .env}
ATPROTO_PDS_URL: ${ATPROTO_PDS_URL:-https://bsky.social}
API_HOST: 0.0.0.0
API_PORT: 4000
API_PUBLIC_ORIGIN: ${STAGING_PUBLIC_ORIGIN:-https://staging.patchwork.subcult.tv}
API_DATA_SOURCE: ${API_DATA_SOURCE:-postgres}
API_DATABASE_URL: postgresql://patchwork:${PATCHWORK_STAGING_POSTGRES_PASSWORD:?Set PATCHWORK_STAGING_POSTGRES_PASSWORD in .env}@patchwork-staging-postgres:5432/patchwork
networks:
staging-internal:
staging-web:
aliases:
- patchwork-staging-api
patchwork-spool:
build:
context: .
dockerfile: Dockerfile
target: indexer-runtime
container_name: patchwork-staging-spool
restart: unless-stopped
environment:
NODE_ENV: production
PATCHWORK_ENV: staging
LOG_LEVEL: ${LOG_LEVEL:-info}
ATPROTO_SERVICE_DID: ${STAGING_ATPROTO_SERVICE_DID:?Set STAGING_ATPROTO_SERVICE_DID in .env}
ATPROTO_PDS_URL: ${ATPROTO_PDS_URL:-https://bsky.social}
INDEXER_PORT: 4100
INDEXER_FIREHOSE_URL: ${INDEXER_FIREHOSE_URL:-wss://bsky.network}
networks:
staging-internal:
staging-web:
aliases:
- patchwork-staging-spool
patchwork-thimble:
build:
context: .
dockerfile: Dockerfile
target: moderation-runtime
container_name: patchwork-staging-thimble
restart: unless-stopped
environment:
NODE_ENV: production
PATCHWORK_ENV: staging
LOG_LEVEL: ${LOG_LEVEL:-info}
ATPROTO_SERVICE_DID: ${STAGING_ATPROTO_SERVICE_DID:?Set STAGING_ATPROTO_SERVICE_DID in .env}
ATPROTO_PDS_URL: ${ATPROTO_PDS_URL:-https://bsky.social}
MODERATION_PORT: 4200
MODERATION_WORKER_CONCURRENCY: ${MODERATION_WORKER_CONCURRENCY:-2}
networks:
staging-internal:
staging-web:
aliases:
- patchwork-staging-thimble
patchwork-web:
build:
context: .
dockerfile: Dockerfile
target: web-runtime
args:
VITE_APP_NAME: 'Patchwork (Staging)'
VITE_API_BASE_URL: ${STAGING_VITE_API_BASE_URL:-https://staging.patchwork.subcult.tv/api}
container_name: patchwork-staging-web
restart: unless-stopped
depends_on:
- patchwork-api
networks:
staging-web:
aliases:
- patchwork-staging-web
volumes:
patchwork-staging-postgres-data:
networks:
staging-internal:
driver: bridge
staging-web:
external: true
name: staging-web