forked from Valour-Software/Valour
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (118 loc) · 4.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
123 lines (118 loc) · 4.46 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
# Self-hosted Valour — one domain, batteries included.
# 1. cp .env.example .env (edit values)
# 2. docker compose up -d
# 3. open https://$VALOUR_DOMAIN
#
# Media is stored on local disk (the "media" volume). To use S3-compatible
# storage instead, set CDN__StorageMode=s3 and the CDN__S3* variables, or
# enable the optional minio profile: docker compose --profile minio up -d
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: valour
POSTGRES_USER: valour
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U valour -d valour"]
interval: 5s
timeout: 3s
retries: 12
restart: unless-stopped
redis:
image: redis:7-alpine
restart: unless-stopped
valour:
image: ghcr.io/valour-software/valour:main-latest
# To run from local source instead of the published image:
# build:
# context: .
# args:
# # Version stamp for cache-busting asset URLs. Any string that changes
# # between builds works, e.g. SHORTHASH=$(git rev-parse --short=8 HEAD)
# SHORTHASH: dev
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:5000
- Database__Host=postgres
- Database__Database=valour
- Database__Username=valour
- Database__Password=${POSTGRES_PASSWORD}
- Redis__ConnectionString=redis:6379
- Node__Name=main
- Node__Location=https://${VALOUR_DOMAIN:?set VALOUR_DOMAIN in .env}
# Optional community-node federation. Configure these with
# ./scripts/valour-node-setup; this self-hosted bundle is not an official
# hub replica. The wizard generates and stores the KEK only in .env.
- Federation__HubUrl=${FEDERATION__HUBURL:-}
- Federation__NodeDomain=${FEDERATION__NODEDOMAIN:-}
- Federation__NodeChallenge=${FEDERATION__NODECHALLENGE:-}
- Federation__AllowPublicMigrations=${FEDERATION__ALLOWPUBLICMIGRATIONS:-false}
- DataProtection__Kek=${DATAPROTECTION__KEK:-}
# Single-domain mode: app, api, cdn, threads, and docs all served from
# VALOUR_DOMAIN (empty subdomains collapse to the root domain).
- Hosting__InstanceName=${VALOUR_INSTANCE_NAME:-Valour}
- Hosting__RootDomain=${VALOUR_DOMAIN}
- Hosting__AppSubdomain=
- Hosting__ApiSubdomain=
- Hosting__ThreadsSubdomain=
- Hosting__WikiSubdomain=
- Hosting__ContentCdnSubdomain=
- Hosting__PublicCdnSubdomain=
# Local-disk media storage (default for self-hosting)
- CDN__StorageMode=filesystem
- CDN__FileSystemPath=/app/media
# First-run staff account (created only if no staff account exists)
- Bootstrap__AdminEmail=${VALOUR_ADMIN_EMAIL:-}
- Bootstrap__AdminPassword=${VALOUR_ADMIN_PASSWORD:-}
# Voice/video. Empty by default (voice disabled). To self-host voice, set
# VOICE_PROVIDER=livekit + the keys in .env and run the voice Compose overlay.
# The server reaches the SFU over the compose network for room admin, while
# clients connect to the public wss URL.
- Voice__Provider=${VOICE_PROVIDER:-}
- Voice__LiveKitUrl=${VOICE_LIVEKIT_URL:-}
- Voice__LiveKitApiUrl=${VOICE_LIVEKIT_API_URL:-http://livekit:7880}
- Voice__LiveKitApiKey=${VOICE_LIVEKIT_API_KEY:-}
- Voice__LiveKitApiSecret=${VOICE_LIVEKIT_API_SECRET:-}
volumes:
- media:/app/media
restart: unless-stopped
caddy:
image: caddy:2
ports:
- "80:80"
- "443:443"
environment:
- VALOUR_DOMAIN=${VALOUR_DOMAIN}
volumes:
- ./selfhost/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- valour
restart: unless-stopped
# Optional S3-compatible storage. Enable with: docker compose --profile minio up -d
# Then point the server at it: CDN__StorageMode=s3, CDN__S3Endpoint=http://minio:9000, etc.
minio:
image: minio/minio:latest
profiles: ["minio"]
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-valour}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-${POSTGRES_PASSWORD}}
volumes:
- minio_data:/data
restart: unless-stopped
volumes:
pgdata:
media:
caddy_data:
caddy_config:
minio_data: