38 lines
1.2 KiB
Django/Jinja
38 lines
1.2 KiB
Django/Jinja
version: '3'
|
|
|
|
# Generated by ansible for site {{ site.url }}
|
|
# On network {{ site.subnet_cidr_address }}:
|
|
# - site (synapse) at {{ site.subnet_site_ip }}
|
|
|
|
# Synapse's docker-compose: https://github.com/matrix-org/synapse/blob/master/contrib/docker/docker-compose.yml
|
|
|
|
services:
|
|
site:
|
|
image: matrixdotorg/synapse:{{ synapse.version }}
|
|
restart: unless-stopped
|
|
environment:
|
|
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
|
- UID={{ site.user_uid }}
|
|
- GID={{ site.user_gid }}
|
|
volumes:
|
|
- "{{ site_data_path }}/site:/data"
|
|
networks:
|
|
net:
|
|
ipv4_address: "{{ site.subnet_site_ip }}"
|
|
# db:
|
|
# image: postgres:latest
|
|
# environment:
|
|
# - POSTGRES_USER="{{ site.postgres_username }}"
|
|
# - POSTGRES_PASSWORD="{{ site.postgres_password }}"
|
|
# # ensure the database gets created correctly
|
|
# # https://github.com/matrix-org/synapse/blob/master/docs/postgres.md#set-up-database
|
|
# - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
|
|
# volumes:
|
|
# - "{{ site_data_path }}/db:/var/lib/postgresql/data"
|
|
|
|
networks:
|
|
net:
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: "{{ site.subnet_cidr_address }}"
|