From f47bcd3f0c9d7843264900484473866282745c93 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Sun, 1 May 2022 16:38:54 -0400 Subject: [PATCH] Fix Docker support - Add .dockerignore files - Make default Node config force-overwrite its socket file - puppet.sock -> rpc.sock - Warn against starting bridge module before node module --- .dockerignore | 10 ++++++++++ SETUP.md | 1 + node/.dockerignore | 1 + node/example-config-docker.json | 4 ++-- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 node/.dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5b18104 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.editorconfig +logs +.venv +start +config.yaml +registration.yaml +*.db +*.pickle +node_modules +**/*.sock diff --git a/SETUP.md b/SETUP.md index 7b5a4b9..bfb1a49 100644 --- a/SETUP.md +++ b/SETUP.md @@ -93,6 +93,7 @@ These instructions describe how to run the bridge with Docker containers. 1. Generate the appservice registration by running the container again, and update your homeserver configuration to accept it 1. Run the bridge module with `docker run --restart unless-stopped -v $(pwd):/data:z matrix-appservice-kakaotalk` * Additionally, you should either add the bridge to the same Docker network as your homeserver and database with `--network=` (when they are running in Docker), or expose the correct port(s) with `-p :` or `--network=host` (when they are running outside Docker). + * If the Node module is configured to use a unix socket, make sure to start the bridge module's container _after_ the Node module's container. Otherwise, the bridge module may not be able to find the socket file. ## Upgrading Simply `git pull` or `git rebase` the latest changes, rerun all `docker build` commands, then run new containers for the freshly-built images. diff --git a/node/.dockerignore b/node/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/node/example-config-docker.json b/node/example-config-docker.json index 85969e6..1fb93f1 100644 --- a/node/example-config-docker.json +++ b/node/example-config-docker.json @@ -1,7 +1,7 @@ { "listen": { "type": "unix", - "path": "/data/puppet.sock", - "force": false + "path": "/data/rpc.sock", + "force": true } }