From 074ea359e74ff724c19cc3c27dd30478c19a0076 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 19 Mar 2022 02:47:33 +0300 Subject: [PATCH] synapse-admin. networks. --- synapse-admin/docker-compose.yml | 8 +++++++- synapse/README.md | 12 ++++++++++-- synapse/docker-compose.yml | 14 ++++++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/synapse-admin/docker-compose.yml b/synapse-admin/docker-compose.yml index 51e31f6..e19ccb7 100644 --- a/synapse-admin/docker-compose.yml +++ b/synapse-admin/docker-compose.yml @@ -1,12 +1,18 @@ # https://hub.docker.com/r/awesometechnologies/synapse-admin version: '3.7' +networks: + # You need to create this network manually first! + synapse: + external: true + services: synapse-admin: image: awesometechnologies/synapse-admin container_name: synapse-admin hostname: synapse-admin - network_mode: host + networks: + - synapse ports: - "${WEBUI_BIND_ADDR:-127.0.0.1}:${WEBUI_BIND_PORT:-8009}:80" env_file: .env diff --git a/synapse/README.md b/synapse/README.md index 25ccd4a..a294812 100644 --- a/synapse/README.md +++ b/synapse/README.md @@ -1,6 +1,14 @@ # [Synapse](https://matrix.org/docs/projects/server/synapse) ([Matrix.org](https://matrix.org/) server) -# Generating server configuration +## Shared network + +You MUST create a shared network `synapse` for potential ability to communicate with synapse from `synapse-admin` stack. + +```shell +docker network create --internal synapse +``` + +## Generating server configuration Do not forget to prepare `.env` file before running this. @@ -12,7 +20,7 @@ After that you can edit `./data/homeserver.yaml` according to your needs. If you want to use full-fledged PostgreSQL instead of SQLite, you can check [this documentation](https://github.com/matrix-org/synapse/blob/master/docs/postgres.md). -# Running the server +## Running the server ```shell docker-compose up -d diff --git a/synapse/docker-compose.yml b/synapse/docker-compose.yml index 5f694ab..14b13c5 100644 --- a/synapse/docker-compose.yml +++ b/synapse/docker-compose.yml @@ -1,13 +1,23 @@ version: '3.7' +networks: + # This way we'll be able to access PostgreSQL on local machine using 'localhost' when it's listening only locally. + hostnet: + external: true + name: host + # You need to create this network manually first! + synapse: + external: true + services: synapse: # https://hub.docker.com/r/matrixdotorg/synapse # https://github.com/matrix-org/synapse/tree/master/docker image: "matrixdotorg/synapse:${IMAGE_VERSION:-latest}" container_name: synapse - # This way we'll be able to access PostgreSQL on local machine using 'localhost' when it's listening only locally. - network_mode: host + networks: + - hostnet + - synapse ports: - "${INTERFACE_EXT:-127.0.0.1}:${HTTP_PORT_EXT:-8008}:${HTTP_PORT_INT:-8008}/tcp" volumes: