Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md, add docker-compose #462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ location /.well-known/matrix/client {
```

### Running
There are three ways to run the proxy:
There are four ways to run the proxy:
- Compiling from source:
```
$ CGO_ENABLED=0 go build ./cmd/syncv3
Expand All @@ -94,6 +94,42 @@ $ SYNCV3_SECRET=$(cat .secret) SYNCV3_SERVER="https://matrix-client.matrix.org"
```
docker run --rm -e "SYNCV3_SERVER=https://matrix-client.matrix.org" -e "SYNCV3_SECRET=$(cat .secret)" -e "SYNCV3_BINDADDR=:8008" -e "SYNCV3_DB=user=$(whoami) dbname=syncv3 sslmode=disable host=host.docker.internal password='DATABASE_PASSWORD_HERE'" -p 8008:8008 ghcr.io/matrix-org/sliding-sync:latest
```
- Using Docker Compose:

```
services:
sliding-proxy:
image: ghcr.io/matrix-org/sliding-sync:v0.99.1
restart: unless-stopped
ports:
- "127.0.0.1:8881:8881"
environment:
- "SYNCV3_SECRET="
- "SYNCV3_SERVER=DOMAIN.tld"
- "SYNCV3_DB=user=syncv3 dbname=syncv3 sslmode=disable host=sliding-postgres password=DATABASE_PASSWORD_HERE"
- "SYNCV3_BINDADDR=0.0.0.0:8881"
depends_on:
- sliding-postgres
networks:
- synapse_default

sliding-postgres:
image: docker.io/postgres:15-alpine
restart: unless-stopped
environment:
- "POSTGRES_USER=syncv3"
- "POSTGRES_PASSWORD=DATABASE_PASSWORD_HERE"
- "POSTGRES_DB=syncv3"
volumes:
- /PATH/TO/SOME/DIR/sliding_db_data:/var/lib/postgresql/data
networks:
- synapse_default

networks:
synapse_default:
external: true
name: synapse_default
```

- Precompiled binaries:

Expand Down