From 91926dd2cd0a2008adbeb1b9fec12d84b8496204 Mon Sep 17 00:00:00 2001 From: Seth For Privacy <40500387+sethforprivacy@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:06:15 -0400 Subject: Add Dockerfile and GAs for Docker image deployment * Initial Dockerfile and Github Actions * Properly name final Docker build stage * Add tag for package.version * Correct cargo-get syntax * Fix version tagging and add sentrum.toml to .gitignore * Fix newlines and add Docker examples * Fix branch on Github Action and minor copy update --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index b37d0c7..14abe54 100644 --- a/README.md +++ b/README.md @@ -346,7 +346,52 @@ sudo systemclt enable --now sentrum.service 6. Check the logs with `journalctl -fu sentrum` -# Future Work +## Docker + +To run sentrum using Docker, you can either build the image yourself or use the prebuilt image. + +### Building the image + +To build the image from source, run the following: + +```bash +git clone https://github.com/sommerfelddev/sentrum.git +cd sentrum +docker build -t sentrum:local . +``` + +To use the prebuilt image, simply pull from GHCR: + +```bash +docker pull docker pull ghcr.io/sommerfelddev/sentrum:latest +``` + +Note that there are two types of tags: + +`latest`: a tag from the latest commit to master +`x.x.x`: (i.e. `0.1.1`) a tag of the corresponding sentrum version + +### Running the image + +To run the image, simply run the following, passing in the `sentrum.toml` file you created and configured earlier: + +```bash +docker run --rm -it --volume ./sentrum.toml:/sentrum.toml ghcr.io/sommerfelddev/sentrum:latest +``` + +If using Docker compose, you can configure the service as follows: + +```yaml +services: + sentrum: + container_name: sentrum + image: ghcr.io/sommerfelddev/sentrum:latest + restart: unless-stopped + volumes: + - ./sentrum.toml:/sentrum.toml +``` + +## Future Work * More action types: - Matrix DM -- cgit v1.2.3-70-g09d2