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
|
SERVER_NAME=localhost
|
||||||
HTTP_PORT=8008
|
HTTP_PORT=8008
|
||||||
CONFIG_DIR=/data
|
CONFIG_DIR=/data
|
||||||
@ -6,3 +7,5 @@ CONFIG_FILE_NAME=homeserver.yaml
|
|||||||
UID=991
|
UID=991
|
||||||
GID=991
|
GID=991
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
|
|
||||||
|
POSTGRESQL_IMAGE_TAG=14
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.env
|
.env
|
||||||
|
postgres_password.txt
|
@ -1,9 +1,27 @@
|
|||||||
volumes:
|
volumes:
|
||||||
synapse-data:
|
synapse-data:
|
||||||
|
postgres:
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
postgres_password:
|
||||||
|
file: ./postgres_password.txt
|
||||||
|
|
||||||
services:
|
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:
|
synapse:
|
||||||
image: matrixdotorg/synapse:${IMAGE_TAG}
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- synapse-data:${CONFIG_DIR}
|
- synapse-data:${CONFIG_DIR}
|
||||||
@ -15,3 +33,5 @@ services:
|
|||||||
TZ: ${TZ}
|
TZ: ${TZ}
|
||||||
ports:
|
ports:
|
||||||
- ${HTTP_PORT}:8008
|
- ${HTTP_PORT}:8008
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
Loading…
Reference in New Issue
Block a user