services: postgres: container_name: synapse-postgres image: postgres:alpine restart: always user: {{ users['synapse_postgres'] }}:{{ users['synapse_postgres'] }} environment: LANG: C POSTGRES_INITDB_ARGS: "--locale=C --encoding=UTF8" POSTGRES_USER: {{ synapse_secrets['postgres_user'] }} POSTGRES_PASSWORD: {{ synapse_secrets['postgres_password'] }} volumes: - {{ volumes['synapse_postgres_datadir'] }}:/var/lib/postgresql/data synapse: container_name: synapse image: matrixdotorg/synapse:latest restart: always environment: UID: {{ users['synapse'] }} GID: {{ users['synapse'] }} TZ: {{ timezone }} ports: - 127.0.0.1:{{ ports['synapse'] }}:8008 volumes: - {{ volumes['synapse_datadir'] }}:/data - ./homeserver.yaml:/data/homeserver.yaml