From 8a0d82f49babfc82305b68eead6b188c59dc52b1 Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Wed, 3 Jun 2026 23:19:45 +0200 Subject: [PATCH] fix: add .dockerignore and src volume mount for live code sync Add .dockerignore to exclude __pycache__, .venv, test artifacts, and other host-only files from Docker build context. Prevents stale .pyc cache pollution in container images. Add read-only bind mount for ./apps/api/src:/app/src in docker-compose.yml so code changes on the host are reflected in the running container without requiring image rebuild. This is a dev convenience that resolves the persistent 'tool_configs' import error from stale container images. Quality gates: docker-compose.yml syntax valid, .dockerignore parsed. --- apps/api/.dockerignore | 43 ++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 1 + 2 files changed, 44 insertions(+) create mode 100644 apps/api/.dockerignore diff --git a/apps/api/.dockerignore b/apps/api/.dockerignore new file mode 100644 index 0000000..1fb64e8 --- /dev/null +++ b/apps/api/.dockerignore @@ -0,0 +1,43 @@ +# Python cache +__pycache__/ +*.py[cod] +*$py.class +*.so + +# Virtual environments +.venv/ +venv/ +env/ + +# Test artifacts +.pytest_cache/ +.coverage +htmlcov/ + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# Git +.git/ +.gitignore + +# Local env files +.env +.env.local + +# Alembic cache +alembic/versions/__pycache__/ + +# Pi lens cache +.pi-lens/ + +# Documentation +docs/ +*.md + +# Scripts not needed in container +scripts/ +wait-for-db.sh diff --git a/docker-compose.yml b/docker-compose.yml index 0afe634..5213ac9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,7 @@ services: - /data/repos:/data/repos - /data/working-copies:/data/working-copies - /data/instances:/data/instances + - ./apps/api/src:/app/src:ro ports: - "8000:8000" depends_on: