From f912162c4d26fecfd77e3ef6527fb60f14b351a6 Mon Sep 17 00:00:00 2001 From: daru Date: Mon, 7 Sep 2026 06:08:52 +0000 Subject: [PATCH] Include Docker Compose example in installation guide (#262) Adds a Docker Compose example alongside the existing `docker run` one, using a tagged release and the same hardening options. Co-authored-by: daru Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Nh4Z2JCU4aVC5STFN7usfW --- docs/installation.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index f76b9cf..779d258 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -57,6 +57,34 @@ CONTAINER_IMAGE_NAME=ghcr.io/etkecc/baibot:v1.0.0 $CONTAINER_IMAGE_NAME ``` +Alternatively, you can use [Docker Compose](https://docs.docker.com/compose/) with a `compose.yml` file like this: + +```yaml +services: + baibot: + container_name: baibot + # Adjust the version tag to point to the latest available tagged version. + # If building your own container image name, adjust to something like `localhost/baibot:latest`. + image: ghcr.io/etkecc/baibot:v1.0.0 + # Set `UID` and `GID` in a `.env` file next to `compose.yml` (e.g. `UID=1000`, `GID=1000`) + # or export them in your shell (`export UID GID="$(id -g)"`). + # These should match the user that owns the data directory. + user: "${UID:-1000}:${GID:-1000}" + environment: + # Other settings can also be set via environment variables. + # See the 🛠️ Configuration documentation (docs/configuration/README.md) for details. + BAIBOT_PERSISTENCE_DATA_DIR_PATH: /data + volumes: + - /path/to/config.yml:/app/config.yml:ro + - /path/to/data:/data + cap_drop: + - ALL + read_only: true + tmpfs: + - /tmp:rw,noexec,nosuid,size=1024m + restart: unless-stopped +``` + 💡 If you've defined the `persistence.data_dir_path` setting in the `config.yml` file, you can skip the `BAIBOT_PERSISTENCE_DATA_DIR_PATH` environment variable.