Files
2026-09-21 19:21:08 -07:00

54 lines
1.8 KiB
Plaintext

# Butane config for running bookstack-mcp as a container on Flatcar Container
# Linux. Convert to Ignition and hand it to the machine on first boot:
#
# butane --pretty --strict bookstack-mcp.bu > bookstack-mcp.ign
#
# Fill in the image reference below (your Gitea registry) and the values in
# the env file. systemd's EnvironmentFile= only sets the *unit's* environment
# (i.e. what the docker CLI sees), not the container's -- that's why the unit
# passes --env-file explicitly to `docker run`.
variant: flatcar
version: 1.0.0
storage:
files:
- path: /etc/bookstack-mcp.env
mode: 0600
contents:
inline: |
BOOKSTACK_URL=https://wiki.example.com
BOOKSTACK_TOKEN_ID=
BOOKSTACK_TOKEN_SECRET=
BOOKSTACK_READ_ONLY=true
MCP_HOST=0.0.0.0
MCP_PORT=8080
MCP_PATH=/mcp
MCP_AUTH_MODE=oidc+token
MCP_PUBLIC_URL=https://mcp.example.com
MCP_STATIC_TOKENS=
# See example.env at the project root for the full list of options
# (OIDC, GitHub OAuth, allowed users/groups, etc).
systemd:
units:
- name: bookstack-mcp.service
enabled: true
contents: |
[Unit]
Description=BookStack MCP Server
After=docker.service network-online.target
Requires=docker.service
Wants=network-online.target
[Service]
ExecStartPre=-/usr/bin/docker rm -f bookstack-mcp
ExecStartPre=/usr/bin/docker pull git.example.com/owner/bookstack-mcp:latest
ExecStart=/usr/bin/docker run --rm --name bookstack-mcp \
--env-file /etc/bookstack-mcp.env \
-p 8080:8080 \
git.example.com/owner/bookstack-mcp:latest
ExecStop=/usr/bin/docker stop bookstack-mcp
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target