Add networks

so matrix and be connected to an existing reverse proxy network
This commit is contained in:
James 2022-02-03 13:16:31 +00:00
parent 682e71b916
commit be2cc1a25e
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# volume # Docker settings
VOLUME_PATH=/data/matrix VOLUME_PATH=/data/matrix
DOCKER_PROXY_NETWORK=proxy # Replace with your proxy's network
# synapse # synapse
SYNAPSE_IMAGE_TAG=latest SYNAPSE_IMAGE_TAG=latest

View File

@ -2,6 +2,12 @@ secrets:
postgres_password: postgres_password:
file: ./postgres_password.txt file: ./postgres_password.txt
networks:
frontend:
external: true
name: ${DOCKER_PROXY_NETWORK}
backend:
services: services:
postgres: postgres:
image: postgres:${POSTGRESQL_IMAGE_TAG} image: postgres:${POSTGRESQL_IMAGE_TAG}
@ -10,6 +16,8 @@ services:
- ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw - ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw
secrets: secrets:
- postgres_password - postgres_password
networks:
- backend
environment: environment:
POSTGRES_DB: synapse POSTGRES_DB: synapse
POSTGRES_USER: synapse_user POSTGRES_USER: synapse_user
@ -23,6 +31,9 @@ services:
- ${VOLUME_PATH}/data:/data:rw - ${VOLUME_PATH}/data:/data:rw
ports: ports:
- ${SYNAPSE_PORT}:8008 - ${SYNAPSE_PORT}:8008
networks:
- frontend
- backend
environment: environment:
SYNAPSE_CONFIG_DIR: /data SYNAPSE_CONFIG_DIR: /data
SYNAPSE_CONFIG_PATH: /data/${CONFIG_FILE_NAME} SYNAPSE_CONFIG_PATH: /data/${CONFIG_FILE_NAME}