52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
# Deploy with:
|
|
# docker stack deploy -c synapse.yml synapse
|
|
#
|
|
# Runs on: pve-social
|
|
# Matrix homeserver. Client/federation API on port 8008.
|
|
#
|
|
# First deploy generates /data/homeserver.yaml automatically.
|
|
# After first boot, update homeserver.yaml on pve-social to add PostgreSQL:
|
|
# database:
|
|
# name: psycopg2
|
|
# args:
|
|
# user: synapse_user
|
|
# password: <from pass homelab/SYNAPSE_DB_PASSWORD>
|
|
# database: synapse_db
|
|
# host: postgres_postgres
|
|
# cp_min: 5
|
|
# cp_max: 10
|
|
|
|
services:
|
|
synapse:
|
|
image: matrixdotorg/synapse:latest
|
|
environment:
|
|
SYNAPSE_SERVER_NAME: pve-social
|
|
SYNAPSE_REPORT_STATS: "no"
|
|
ports:
|
|
- target: 8008
|
|
published: 8008
|
|
protocol: tcp
|
|
mode: host
|
|
volumes:
|
|
- synapse_data:/data
|
|
networks:
|
|
- overlay-net
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == pve-social
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
|
|
volumes:
|
|
synapse_data:
|
|
|
|
networks:
|
|
overlay-net:
|
|
external: true
|
|
name: ${OVERLAY_NETWORK:-homelab-net}
|