From a7824ef4485fe0919169ccf4d9334f434d70d612 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Thu, 4 Feb 2021 17:54:24 -0600 Subject: [PATCH] updating readme with docker info --- README.md | 31 +++++++++++++++++++++++++++++++ pkg/server/server.go | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98dc7ad..39f0461 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,34 @@ This is a generic handler that will accept any form of data and pass it through ### Usage > POST /slack/{matrixRoom}/{matrixUser}/{matrixPassword} This is a Slack-friendly handler that will accept any form of Slack data and pass through just the text to Matrix using the appropriate JSON format. + + +### Docker Usage + +#### Prebuilt Image +There is a prebuilt image already on `registry.linuxrocker.com/matrix-handler:latest` + +#### Building Your Own + +You can build the image by running + +```bash +docker build -t myrepo/matrix-handler:latest . +``` + +#### Docker Compose +You can use these settings for deploying via Docker Compose. + +```yaml +version: '3.5' +services: + matrix-handler: + image: registry.linuxrocker.com/matrix-handler:latest + restart: always + container_name: matrix-handler + ports: + - 3000:3000 + volumes: + - ./config.json:/config/config.json:ro +``` + diff --git a/pkg/server/server.go b/pkg/server/server.go index 00ec7b8..f72ef2e 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -17,7 +17,7 @@ import ( // Run ... func Run(info *router.BuildInfo) error { - conf, err := config.GetConfig("config.json") + conf, err := config.GetConfig("/config/config.json") if err != nil { log.Fatal().Err(err) }