mirror of
https://github.com/Thumbscrew/matrix-homeserver-docker-compose.git
synced 2025-01-18 09:35:46 +00:00
add postgres service for backend database
This commit is contained in:
parent
30b2101099
commit
e658d71853
@ -1,4 +1,5 @@
|
||||
IMAGE_TAG=latest
|
||||
# synapse
|
||||
SYNAPSE_IMAGE_TAG=latest
|
||||
SERVER_NAME=localhost
|
||||
HTTP_PORT=8008
|
||||
CONFIG_DIR=/data
|
||||
@ -6,3 +7,5 @@ CONFIG_FILE_NAME=homeserver.yaml
|
||||
UID=991
|
||||
GID=991
|
||||
TZ=UTC
|
||||
|
||||
POSTGRESQL_IMAGE_TAG=14
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.env
|
||||
postgres_password.txt
|
@ -1,9 +1,27 @@
|
||||
volumes:
|
||||
synapse-data:
|
||||
postgres:
|
||||
|
||||
secrets:
|
||||
postgres_password:
|
||||
file: ./postgres_password.txt
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:${POSTGRESQL_IMAGE_TAG}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data:rw
|
||||
secrets:
|
||||
- postgres_password
|
||||
environment:
|
||||
POSTGRES_DB: synapse
|
||||
POSTGRES_USER: synapse_user
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
||||
POSTGRES_INITDB_ARGS: --encoding=UTF8 --locale=C
|
||||
|
||||
synapse:
|
||||
image: matrixdotorg/synapse:${IMAGE_TAG}
|
||||
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- synapse-data:${CONFIG_DIR}
|
||||
@ -15,3 +33,5 @@ services:
|
||||
TZ: ${TZ}
|
||||
ports:
|
||||
- ${HTTP_PORT}:8008
|
||||
depends_on:
|
||||
- postgres
|
||||
|
Loading…
Reference in New Issue
Block a user