fix(docker): repo-root-relative COPY paths for shared build context - #16
Merged
Conversation
The shared metarepo build workflow builds with repo-root context (context: .), so the bot-dir-relative COPY paths no longer resolve. Copy package*.json and bot.ts by their repo-root-relative paths. Single-stage image and all other directives unchanged; tsconfig intentionally not copied (tsx needs none, tsc absent under npm ci --production).
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The alphafi metarepo shared Docker build workflow (
shared-docker-build.yml) builds every non-frontend service with repo-root build context (context: .). The current Dockerfile uses bot-directory-relative COPY paths, which do not resolve under that context. This changes the two COPY sources to repo-root-relative paths:Everything else is unchanged: single-stage
node:22-alpine, LABELs,WORKDIR /app,npm ci --production,kill -0 1HEALTHCHECK,USER node,tsx bot.tsCMD.tsconfig.jsonis intentionally not copied (tsx needs none; typescript absent undernpm ci --production).Verification
Built from the metarepo root under repo-root context:
docker build -f alphafi-betterstack/Dockerfile .succeeds (no missing-file COPY error)--target prodfails withtarget stage "prod" could not be found(single-stage preserved)/appcontains onlybot.ts,node_modules,package-lock.json,package.json(no stray metarepo files)Part of the betterstack-deploy pipeline cycle (metarepo
feat/betterstack-deploy-pipeline). This fix must merge and the metarepo submodule pointer bump before the first real shared-workflow build.