mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-23 03:27:43 +09:00
The panel serves the fleet-agent installers at /api/v1/servers/install.sh and /install.ps1 by reading them off its own filesystem, resolving <tree root>/scripts four dirnames up from app/api/servers.py. In the image that is /app/scripts -- and the Dockerfile only ever copied backend/, VERSION and frontend/dist, so the directory did not exist. Every containerised panel answered the enrollment one-liner printed in its own Add Server dialog with a 404, and no server could join the fleet. Verified against the published image: `ls /app` has no scripts, and a booted container returns 404 while /api/v1/system/health returns 200. Bare metal was unaffected -- install.sh git-clones the whole repo, and the release tarball excludes only scripts/test/output. Ship just the two installers: both are standalone (they source nothing from scripts/lib), so scripts/lib, keys, the test harnesses and stage-remote.sh stay out of the image. The .dockerignore comment claiming the build "only needs frontend/, backend/, VERSION" was wrong and authoritative, which is a large part of why this went unnoticed; it now states the real list. Closes #101 (packaging half). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
82 lines
2.4 KiB
Plaintext
82 lines
2.4 KiB
Plaintext
# --- ServerKit Docker build context ---
|
|
# The context is uploaded to the daemon before any COPY runs, so anything listed
|
|
# here is never read, never hashed, and never busts a layer cache. Without this
|
|
# file the context is ~750 MB of node_modules/.git/venvs — and the build fails
|
|
# outright on the broken symlink at backend/.venv-wsl/lib64.
|
|
#
|
|
# The Dockerfile needs: frontend/ (sources + package*.json), backend/, VERSION,
|
|
# and scripts/install.sh + scripts/install.ps1 (the panel serves those two over
|
|
# HTTP for fleet enrollment). Keep this list honest — it read "only frontend,
|
|
# backend, VERSION" while the agent installers were being served from disk, and
|
|
# that wrong-but-authoritative comment is why nobody noticed they never shipped.
|
|
#
|
|
# NOTE: do NOT add `!exception` patterns here. A single negation makes Docker
|
|
# descend into every excluded directory (a nested file might be re-included),
|
|
# which both slows the walk and re-exposes the unreadable .venv-wsl symlink.
|
|
|
|
# Version control
|
|
.git
|
|
.gitignore
|
|
.github
|
|
|
|
# Node / frontend build artifacts (npm ci runs inside the builder stage)
|
|
**/node_modules
|
|
frontend/dist
|
|
frontend/coverage
|
|
frontend/.eslintcache
|
|
frontend/.stylelintcache
|
|
**/npm-debug.log*
|
|
**/yarn-debug.log*
|
|
**/yarn-error.log*
|
|
|
|
# Python virtualenvs — large, host-specific, and .venv-wsl carries a lib64
|
|
# symlink that the Windows daemon cannot stat, aborting the context upload.
|
|
**/venv
|
|
**/.venv
|
|
**/.venv-wsl
|
|
backend/venv
|
|
backend/.venv
|
|
backend/.venv-wsl
|
|
**/__pycache__
|
|
**/*.py[cod]
|
|
**/.pytest_cache
|
|
**/.mypy_cache
|
|
**/.tox
|
|
**/.coverage
|
|
**/htmlcov
|
|
|
|
# Local dev state (SQLite DBs, deployed sample apps, captured config)
|
|
backend/dev-data
|
|
backend/instance
|
|
|
|
# The test suite runs in CI against the source tree, never inside the image
|
|
# (release.yml builds and pushes; it does not `docker run pytest`). Nothing in
|
|
# backend/app imports from tests/ — the only references are source comments.
|
|
backend/tests
|
|
|
|
# Secrets / environment — must never end up in an image layer
|
|
.env
|
|
**/.env
|
|
**/.env.*
|
|
|
|
# Docs and marketing assets are not served by the panel (every docs/*.md
|
|
# reference in backend/app is a source comment; manifest_spec_service embeds
|
|
# its JSON Schema precisely so validation works without docs/ present).
|
|
docs
|
|
*.md
|
|
|
|
# Release artifacts and packaging outputs
|
|
dist
|
|
packages
|
|
*.msi
|
|
*.wixpdb
|
|
|
|
# Go agent (lives in the sibling serverkit-agent repo; never in the panel image)
|
|
agent
|
|
|
|
# Editor / OS noise
|
|
.vscode
|
|
.idea
|
|
.DS_Store
|
|
Thumbs.db
|