fix(docker): make instance directory configurable and writable

- Add INSTANCE_BASE_PATH config option (defaults to /data/instances)
- Update docker.py to use configured path instead of hardcoded 'data/instances'
- Update Dockerfile to create /data/instances and chown to appuser
- Add instance_data volume to docker-compose.traefik.yml and docker-compose.yml
- Set INSTANCE_BASE_PATH env var in both compose files

This fixes the PermissionError when creating tool instances because
appuser can now write to /data/instances.
This commit is contained in:
Fusion
2026-05-20 10:09:37 +02:00
parent d4e992a9e2
commit 25662e525c
5 changed files with 17 additions and 5 deletions
+4 -1
View File
@@ -53,10 +53,12 @@ services:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
REDIS_URL: redis://redis:6379/0
JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
SESSION_SECRET: ${SESSION_SECRET:-change-me-in-production}
REPO_BASE_PATH: /data/repos
INSTANCE_BASE_PATH: /data/instances
volumes:
- repo_data:/data/repos
- instance_data:/data/instances
ports:
- "8000:8000"
depends_on:
@@ -90,6 +92,7 @@ volumes:
postgres_data:
redis_data:
repo_data:
instance_data:
networks:
backend: