mirror of
https://github.com/CoolnsX/selfhost.git
synced 2025-12-20 07:15:17 +05:30
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
services:
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- $DATABASE_DIR:/var/lib/postgresql/data
|
|
- ./.socket:/tmp/matrix
|
|
user: "70:1000"
|
|
environment:
|
|
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
|
- POSTGRES_USER=$POSTGRES_USER
|
|
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
|
|
networks:
|
|
- nginx_proxy
|
|
command: postgres -c unix_socket_directories='/var/run/postgresql/,/tmp/matrix/' -c unix_socket_permissions=0770
|
|
|
|
synapse:
|
|
container_name: synapse
|
|
image: matrixdotorg/synapse:latest
|
|
restart: unless-stopped
|
|
environment:
|
|
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
|
- SYNAPSE_SERVER_NAME=$SYNAPSE_SERVER_NAME
|
|
- SYNAPSE_REPORT_STATS=yes
|
|
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
|
- POSTGRES_USER=$POSTGRES_USER
|
|
- POSTGRES_DB=$POSTGRES_DATABASE
|
|
- POSTGRES_HOST=/tmp/matrix
|
|
- UID=$PUID
|
|
- GID=$PGID
|
|
- TZ=$TZ
|
|
networks:
|
|
- nginx_proxy
|
|
volumes:
|
|
- ./synapse:/data
|
|
- ./.socket:/tmp/matrix
|
|
depends_on:
|
|
- postgres
|
|
# command: migrate_config # uncomment this if running first time after filling values in .env
|
|
|
|
element:
|
|
container_name: element
|
|
image: vectorim/element-web:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- $ELEMENT_CONFIG_JSON:/app/config.json
|
|
networks:
|
|
- nginx_proxy
|
|
|
|
networks:
|
|
nginx_proxy:
|
|
external: true
|