feat: Initial Matrix server setup with Postgres, Element, and Keycloak OIDC

This commit is contained in:
Kroonk
2026-05-22 12:26:59 +02:00
commit e15ac071a6
6 changed files with 250 additions and 0 deletions

49
docker-compose.yml Normal file
View File

@@ -0,0 +1,49 @@
services:
synapse:
image: matrixdotorg/synapse:latest
container_name: matrix_synapse
restart: unless-stopped
ports:
- "${SYNAPSE_PORT:-8008}:8008"
volumes:
- ./data:/data
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- UID=1000
- GID=1000
- TZ=Europe/Berlin
depends_on:
- synapse_db
networks:
- default
- npm-net
synapse_db:
image: postgres:16-alpine
container_name: matrix_synapse_db
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-synapse}
POSTGRES_USER: ${POSTGRES_USER:-synapse}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./postgres_data:/var/lib/postgresql/data
networks:
- default
element:
image: vectorim/element-web:latest
container_name: matrix_element
restart: unless-stopped
ports:
- "${ELEMENT_PORT:-8088}:80"
volumes:
- ./element-config.json:/app/config.json
networks:
- default
- npm-net
networks:
npm-net:
external: true