-
-
Notifications
You must be signed in to change notification settings - Fork 87
feat(miner-deployment): add fleet-mode gittensory-miner Docker image (#4295) #4462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
loopover-orb
merged 2 commits into
JSONbored:main
from
andriypolanski:feat/miner-fleet-dockerfile-4295
Jul 9, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Fleet-mode image for @jsonbored/gittensory-miner (#4295). Build context = monorepo root: | ||
| # docker build -f packages/gittensory-miner/Dockerfile -t gittensory-miner:latest . | ||
| # SECRETS ARE NEVER BAKED: supply operator credentials at `docker run` time only. | ||
| # Persistent SQLite ledgers live on a mounted volume (default GITTENSORY_MINER_CONFIG_DIR=/data/miner). | ||
|
|
||
| ARG GITTENSORY_VERSION= | ||
|
|
||
| # --- build: workspace install + engine compile + miner syntax check ---------------------------- | ||
| FROM public.ecr.aws/docker/library/node:24-slim AS build | ||
| WORKDIR /app | ||
| # Full source BEFORE `npm ci`: npm workspaces only symlinks packages that already exist on disk. | ||
| # Same ordering fix as the root gittensory-api Dockerfile — @jsonbored/gittensory-engine must be | ||
| # present when `npm ci` runs or gittensory-miner's workspace dependency cannot resolve. | ||
| COPY . . | ||
| RUN npm ci --ignore-scripts | ||
| RUN npm --workspace @jsonbored/gittensory-engine run build | ||
| RUN npm --workspace @jsonbored/gittensory-miner run build | ||
| RUN npm prune --omit=dev --ignore-scripts | ||
|
|
||
| # --- runtime: non-root CLI image with a mounted config volume ----------------------------------- | ||
| FROM public.ecr.aws/docker/library/node:24-slim AS runtime | ||
| WORKDIR /app | ||
| ARG GITTENSORY_VERSION= | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: npm prune runs lifecycle scripts of removed packages without --ignore-scripts npm prune without --ignore-scripts can execute uninstall scripts of removed devDependencies during the build. Add --ignore-scripts to npm prune to prevent lifecycle script execution during pruning. AI prompt |
||
| ENV NODE_ENV=production \ | ||
| GITTENSORY_MINER_CONFIG_DIR=/data/miner \ | ||
| GITTENSORY_MINER_VERSION=${GITTENSORY_VERSION} \ | ||
| PATH=/app/node_modules/.bin:$PATH | ||
| COPY --from=build --chown=node:node /app/node_modules ./node_modules | ||
| COPY --from=build --chown=node:node /app/packages/gittensory-miner ./packages/gittensory-miner | ||
| COPY --from=build --chown=node:node /app/packages/gittensory-engine ./packages/gittensory-engine | ||
| RUN mkdir -p /data/miner && chown -R node:node /data | ||
| USER node | ||
| VOLUME ["/data/miner"] | ||
| # No HEALTHCHECK: the miner is a batch/CLI workload (`docker run … gittensory-miner <cmd>`), not a | ||
| # long-running HTTP service — there is no steady-state endpoint to probe unless an operator wraps | ||
| # the container in their own supervising loop. | ||
| ENTRYPOINT ["gittensory-miner"] | ||
| CMD ["doctor"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: npm prune runs lifecycle scripts of removed packages without --ignore-scripts
npm prune without --ignore-scripts can execute uninstall scripts of removed devDependencies during the build.
Add --ignore-scripts to npm prune to prevent lifecycle script execution during pruning.
AI prompt