Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.52 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-mas_unisync}
POSTGRES_USER: ${POSTGRES_USER:-mas_unisync}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build: .
depends_on:
postgres:
condition: service_healthy
environment:
MAS_UNISYNC_ENV: production
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-mas_unisync}:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}@postgres:5432/${POSTGRES_DB:-mas_unisync}
OBJECT_STORAGE_PATH: /data/objects
CLIENT_RELEASE_CACHE_PATH: /data/client-releases
SESSION_SECRET: ${SESSION_SECRET:?SESSION_SECRET must be set}
FLARUM_URL: ${FLARUM_URL:-https://forum.example}
ADMIN_FLARUM_GROUP_IDS: ${ADMIN_FLARUM_GROUP_IDS:-}
ADMIN_FLARUM_GROUP_NAMES: ${ADMIN_FLARUM_GROUP_NAMES:-}
LOCK_TTL_SECONDS: ${LOCK_TTL_SECONDS:-60}
volumes:
- object_data:/data/objects
- client_release_cache:/data/client-releases
ports:
- "${BACKEND_PORT:-8000}:8000"
restart: unless-stopped
frontend:
build: ./frontend
depends_on:
- backend
ports:
- "${FRONTEND_PORT:-80}:80"
restart: unless-stopped
volumes:
postgres_data:
object_data:
client_release_cache: