Skip to content

Instantly share code, notes, and snippets.

@joenas joenas/docker-compose.yaml
Last active Sep 15, 2017

Embed
What would you like to do?
Matrix docker-compose with Postgres and docker network
### To use this file you need to run
### $ docker network create matrix-network
version: "2"
services:
postgres:
image: postgres:9.6.4
restart: always
# I like to be able to use psql on the host to connect to the database
# for maintenance. If you already have a postgres running you should remove
# the 'ports' section and uncomment 'expose'
# expose:
# - 5432
# Adding 127.0.0.1 ensures the port isn't exposed ON the host
ports:
- "127.0.0.1:5432:5432"
volumes:
- /opt/matrix/pgdata:/var/lib/postgresql/data
# These will be used on homeserver.yaml later on
environment:
- POSTGRES_PASSWORD=YOUR_PASSWORD_HERE
- POSTGRES_USER=synapse
synapse:
image: silviof/docker-matrix
# Exposing 8008 (no TLS) on localhost means we can reverse proxy with nginx
# 8448 is for federation and should be exposed on host
# 3478 is for TURN (voip calls)
ports:
- "127.0.0.1:8008:8008"
- "8448:8448"
- "3478:3478"
volumes:
- /opt/matrix/synapse:/data
# Our docker network!
networks:
default:
external:
name: matrix-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.