Skip to content
Snippets Groups Projects
Commit a207cccb authored by kaiyou's avatar kaiyou
Browse files

Reuse environment variables of the postgres container

parent 1ba2fe11
No related branches found
No related tags found
No related merge requests found
......@@ -46,15 +46,15 @@ listeners:
## Database ##
{% if SYNAPSE_DB_PASSWORD %}
{% if POSTGRES_PASSWORD %}
database:
name: "psycopg2"
args:
user: "{{ SYNAPSE_DB_USER or "matrix" }}"
password: "{{ SYNAPSE_DB_PASSWORD }}"
database: "{{ SYNAPSE_DB_DATABASE or "matrix" }}"
host: "{{ SYNAPSE_DB_HOST or "db" }}"
port: "{{ SYNAPSE_DB_PORT or "5432" }}"
user: "{{ POSTGRES_USER or "matrix" }}"
password: "{{ POSTGRES_PASSWORD }}"
database: "{{ POSTGRES_DB or "matrix" }}"
host: "{{ POSTGRES_HOST or "db" }}"
port: "{{ POSTGRES_PORT or "5432" }}"
cp_min: 5
cp_max: 10
{% else %}
......
......@@ -6,13 +6,18 @@ version: '3'
services:
synapse:
image: matrix/synapse
image: synapse
# Since snyapse does not retry to connect to the database, restart upon
# failure
restart: unless-stopped
# See the readme for a full documentation of the environment settings
environment:
- SYNAPSE_SERVER_NAME=my.matrix.host
- SYNAPSE_DB_PASSWORD=changeme
- SYNAPSE_ENABLE_REGISTRATION=yes
volumes:
- ./files:/data
depends_on:
- db
# One may either expose ports directly
ports:
- 8448:8448/tcp
......@@ -29,4 +34,4 @@ services:
- POSTGRES_USER=matrix
- POSTGRES_PASSWORD=changeme
volumes:
- ./schemas:/var/lib/postgres
- ./schemas:/var/lib/postgresql/data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment