version: "3.3" services: synapse: image: "matrixdotorg/synapse:latest" container_name: "synapse" volumes: - "./data:/data" environment: - VIRTUAL_HOST=matrix.4rs.nl - VIRTUAL_PORT=8008 - SYNAPSE_SERVER_NAME=4rs.nl - SYNAPSE_REPORT_STATS=no - UID=1000 - GID=1000 ports: - "8008:8008/tcp" - "8448:8448/tcp" postgresql: container_name: postgresql_synapse image: postgres:latest restart: always environment: POSTGRES_PASSWORD: somepassword POSTGRES_USER: synapse POSTGRES_DB: synapse POSTGRES_INITDB_ARGS: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'" volumes: - "./postgresdata:/var/lib/postgresql"