From 293807b92ae3a91976e6d0679683a08dd9f7817c Mon Sep 17 00:00:00 2001 From: aminovfariz Date: Thu, 28 May 2026 09:31:36 +0200 Subject: [PATCH] chore: add .dockerignore for production image builds Co-Authored-By: Claude Sonnet 4.6 --- .dockerignore | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..00e04f1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,48 @@ +# ─── Version control ──────────────────────────────────────────────────────── +.git/ +.gitea/ + +# ─── Development / IDE ────────────────────────────────────────────────────── +# .agents/contracts/ содержит JSON-схемы нужные приложению — НЕ исключать! +# Исключаем только ephemeral артефакты запусков агентов. +.agents/runs/ +.agents/prompts/ +.agents/skills/ +.agents/templates/ +.agents/checks/ +.agents/README.md +.agents/workflow.md +.claude/ +.vscode/ +.idea/ +.DS_Store + +# ─── Secrets (injected at runtime via --env-file) ─────────────────────────── +.env + +# ─── Composer vendor (installed fresh inside the image) ───────────────────── +vendor/ + +# ─── Runtime data (mounted as Docker volumes in production) ───────────────── +# Keep directory skeletons via mkdir in Dockerfile; don't bake user data in. +storage/ +var/ + +# ─── Test suite (not needed in production image) ──────────────────────────── +tests/ +phpunit.xml +.phpunit.result.cache +phpstan.neon +phpstan-baseline.neon +.php-cs-fixer.cache + +# ─── Generated web assets (symlinks / built at runtime by module-assets-sync) +# web/modules/ contains absolute Linux symlinks → invalid on Windows Docker builds. +# The app recreates these at startup; do NOT bake them into the image. +web/modules/ +web/debugger/ + +# ─── Docs & local compose files (not needed inside container) ─────────────── +docs/ +docker-compose.yml +docker-compose.prod.yml