54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
# Guide:
|
|
# https://medium.com/@sncr28/deploying-a-matrix-server-with-element-chat-in-docker-compose-with-nginx-reverse-proxy-cc9850fd32f8
|
|
#
|
|
# Create containers from the /docker folder, not from Portainer
|
|
version: '2.3'
|
|
|
|
networks:
|
|
frontend:
|
|
external: true
|
|
backend:
|
|
external: true
|
|
|
|
services:
|
|
|
|
synapse:
|
|
image: docker.io/matrixdotorg/synapse:latest
|
|
container_name: synapse
|
|
restart: unless-stopped
|
|
environment:
|
|
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
|
volumes:
|
|
- /docker/synapse/files:/data
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
frontend:
|
|
ipv4_address: 172.20.0.x
|
|
backend:
|
|
ipv4_address: 172.30.0.x
|
|
|
|
db:
|
|
image: docker.io/postgres:17-alpine
|
|
container_name: synapse-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=synapse
|
|
- POSTGRES_PASSWORD=changeme
|
|
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
|
|
volumes:
|
|
- /docker/synapse/schemas:/var/lib/postgresql/data
|
|
networks:
|
|
backend:
|
|
ipv4_address: 172.30.0.x
|
|
|
|
element:
|
|
image: vectorim/element-web:latest
|
|
restart: unless-stopped
|
|
container_name: element
|
|
volumes:
|
|
- /docker/synapse/element-config.json:/app/config.json
|
|
networks:
|
|
frontend:
|
|
ipv4_address: 172.20.0.x
|