Using PostgreSQL on host machine from Synapse container in a more isolated way. #25

Merged
skobkin merged 2 commits from feature_synapse_postgres_on_host into master 2022-03-19 02:32:20 +00:00
1 changed files with 11 additions and 2 deletions
Showing only changes of commit 1b6e67dba6 - Show all commits

View File

@ -1,13 +1,22 @@
version: '3.7'
networks:
# 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
hostname: synapse
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
- default
- synapse
ports:
- "${INTERFACE_EXT:-127.0.0.1}:${HTTP_PORT_EXT:-8008}:${HTTP_PORT_INT:-8008}/tcp"
volumes: