mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
fix: optimize Docker image size — .dockerignore + selective COPY in runtime
This commit is contained in:
+25
-12
@@ -1,12 +1,25 @@
|
||||
src/frontend/node_modules
|
||||
src/frontend/build
|
||||
src/frontend/coverage
|
||||
src/frontend/test-results
|
||||
src/frontend/playwright-report
|
||||
src/frontend/.dspy_cache
|
||||
**/.DS_Store
|
||||
**/__pycache__
|
||||
**/*.pyc
|
||||
**/.pytest_cache
|
||||
**/.venv
|
||||
**/.env
|
||||
.git
|
||||
.github
|
||||
.vscode
|
||||
.cursor
|
||||
.claude
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
.venv
|
||||
.mypy_cache
|
||||
.ruff_cache
|
||||
.pytest_cache
|
||||
node_modules
|
||||
tests
|
||||
docker
|
||||
docs
|
||||
*.md
|
||||
!README.md
|
||||
.env*
|
||||
.DS_Store
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
*.tar.gz
|
||||
*.whl
|
||||
|
||||
+4
-1
@@ -71,7 +71,10 @@ ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PORT=3006
|
||||
|
||||
COPY --chown=hanzo:hanzo . .
|
||||
# Copy only what's needed at runtime (not .git, tests, docs, docker/, etc.)
|
||||
COPY --chown=hanzo:hanzo ./src /app/src
|
||||
COPY --chown=hanzo:hanzo ./pyproject.toml /app/pyproject.toml
|
||||
COPY --chown=hanzo:hanzo ./README.md /app/README.md
|
||||
|
||||
RUN mkdir -p /app/data /app/logs && chown -R hanzo:hanzo /app/data /app/logs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user