Skip to content

Add docker example to README #47

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

Merged
merged 1 commit into from
Feb 23, 2019
Merged
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,31 @@ Restart your homeserver:
systemctl restart matrix-synapse.service
```

## run in docker

You can also use the bridge with docker. Proceed with steps normally but instead of running script or service, compile the docker image:

```
docker build -t matrix-puppet-facebook .
```

Of course you need working docker on your system.

After that you can run the container:

```
docker run -d --restart=always -p 8090:8090 matrix-puppet-facebook
```

-d is --detach (runs in background), --restart is needed for restarting bridge container when it quits
(it does that every few hours), -p binds port 8090 in container to 8090 on host

You can verify that containers works by running:

```
docker ps
```

## notes

\* Just to explain the reason for `start.sh`, facebook-chat-api contains a bug - https://github.com/Schmavery/facebook-chat-api/issues/555 that necessitates reconnecting to facebook periodically, otherwise message sending will start to fail after a couple of days. `start.sh` ensures that the process restarts properly any time it dies.
Expand Down