diff --git a/README.md b/README.md index 69c7520..c80f5b6 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Not every stack is tested to fully work. - [x] Redis - [ ] Sonarr (prototype state, working itself, but transmission-on-host integration didn't work due to path mismatch) - [x] Speedtest (LibreSpeed) +- [ ] [Synapse](https://hub.docker.com/r/matrixdotorg/synapse) ([Matrix.org](https://matrix.org/) server) - [x] Watchtower - [ ] [Wireguard](https://hub.docker.com/r/cmulk/wireguard-docker) (prototype state, not working yet) - [ ] Wordpress (prototype state) diff --git a/synapse/.env.dist b/synapse/.env.dist new file mode 100644 index 0000000..fe09da9 --- /dev/null +++ b/synapse/.env.dist @@ -0,0 +1,23 @@ +# https://hub.docker.com/r/matrixdotorg/synapse +# https://github.com/matrix-org/synapse/tree/master/docker + +IMAGE_VERSION=latest + +DATA_PATH=./data + +# (mandatory): the server public hostname: +SYNAPSE_SERVER_NAME=my.domain.tld +# (mandatory, yes or no): whether to enable anonymous statistics reporting: +SYNAPSE_REPORT_STATS=no +# where additional config files (such as the log config and event signing key) will be stored: +#SYNAPSE_CONFIG_DIR=/data +# path to the file to be generated: +#SYNAPSE_CONFIG_PATH= +# where the generated config will put persistent data such as the database and media store: +#SYNAPSE_DATA_DIR=/data +# the user id and group id to use for creating the data directories: +#UID=991 +#GID=991 + +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 diff --git a/synapse/README.md b/synapse/README.md new file mode 100644 index 0000000..25ccd4a --- /dev/null +++ b/synapse/README.md @@ -0,0 +1,19 @@ +# [Synapse](https://matrix.org/docs/projects/server/synapse) ([Matrix.org](https://matrix.org/) server) + +# Generating server configuration + +Do not forget to prepare `.env` file before running this. + +```shell +docker-compose run synapse generate +``` + +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 + +```shell +docker-compose up -d +``` diff --git a/synapse/data/.gitignore b/synapse/data/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/synapse/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/synapse/docker-compose.yml b/synapse/docker-compose.yml new file mode 100644 index 0000000..9b890a5 --- /dev/null +++ b/synapse/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.7' + +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 + volumes: + - "${DATA_PATH:-./data}:/data" + env_file: .env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}"