mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-03 13:11:05 +00:00
Per review on #580: keep the default docker-compose.yml and docker-compose.ghcr.yml on host bind mounts so existing native-Linux installs are untouched -- a plain `git pull && docker compose up -d`, update.sh and `backup.sh --with-data` all keep working -- and move the named-volume fix into an opt-in overlay for VM-backed Docker hosts. - docker-compose.desktop.yml (new): layered over the base with `-f docker-compose.yml -f docker-compose.desktop.yml`, it overrides the /app/data, /app/keys and /app/skills host bind mounts with Docker-managed named volumes, so the agent-isolation self-test passes on Docker Desktop for Windows/WSL (0777, ignored chown/chmod) and macOS (fakeowner mount). Works over docker-compose.ghcr.yml too. - README: add a Quick-start callout and a "Docker Desktop on Windows and macOS" section documenting the overlay invocation and the cp-based data/keys/skills handling. The default docs keep describing ./data, ./keys and ./skills, which are correct again now that the default is unchanged. This reverts the earlier default-changing approach (named volumes in the base compose files) in favour of the overlay the maintainer preferred.
46 lines
2.3 KiB
YAML
46 lines
2.3 KiB
YAML
# Docker Desktop overlay for Windows and macOS. Layer it over the base file:
|
|
#
|
|
# docker compose -f docker-compose.yml -f docker-compose.desktop.yml up -d --build
|
|
#
|
|
# or, with the published image:
|
|
#
|
|
# docker compose -f docker-compose.ghcr.yml -f docker-compose.desktop.yml up -d
|
|
#
|
|
# Why this exists: on a VM-backed Docker host the agent-isolation self-test
|
|
# (the fail-closed privilege drop, PR #510) refuses to start when /app/data,
|
|
# /app/keys and /app/skills are HOST bind mounts, so the container crash-loops
|
|
# at startup with "self-test failed ... Bash can create files in /app/data ...".
|
|
# At startup the server runs as root and chowns/chmods those paths so the
|
|
# uid-10001 agent executor cannot write to them; on Docker Desktop it cannot:
|
|
# - Windows/WSL forces the bind mount world-writable (0777) and ignores
|
|
# chown/chmod, so the self-test's "writable by others" check trips.
|
|
# - macOS serves the mount as a "fakeowner" filesystem that reports
|
|
# root:root 0755 inside the container but does not enforce it, so uid 10001
|
|
# can still create files. (This is also why the `chmod -R go-w` workaround
|
|
# from #549 helps on WSL but does nothing on a Mac.)
|
|
#
|
|
# This overlay swaps those three host bind mounts for Docker-managed named
|
|
# volumes, which live inside the Docker VM's own filesystem where the server's
|
|
# chown/chmod take effect, so isolation stays ENABLED (no -dev-insecure-no-isolation).
|
|
# The default docker-compose.yml is left untouched, so native-Linux installs,
|
|
# where host bind mounts work, keep their ./data, ./keys and ./skills directories.
|
|
#
|
|
# Named volumes persist across rebuilds. /app/skills is seeded from the image's
|
|
# baked skills the first time the volume is created; later image skill updates do
|
|
# not overwrite it. Inspect or refresh the volumes from the host with, e.g.:
|
|
# docker compose -f docker-compose.yml -f docker-compose.desktop.yml cp artex:/app/data ./data
|
|
# docker compose -f docker-compose.yml -f docker-compose.desktop.yml cp ./skills/. artex:/app/skills
|
|
services:
|
|
artex:
|
|
# Overrides the base artex bind mounts by container path: these three named
|
|
# volumes replace ./data, ./keys and ./skills. pgdata and everything else are
|
|
# inherited from the base file unchanged.
|
|
volumes:
|
|
- data:/app/data
|
|
- keys:/app/keys
|
|
- skills:/app/skills
|
|
|
|
volumes:
|
|
data:
|
|
keys:
|
|
skills:
|