-
Notifications
You must be signed in to change notification settings - Fork 2
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
ci: fix containerfile build for monorepo layout #170
Conversation
Follow-up to #167.
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.
Left some descriptive comments in-line, to aid in review.
!apps/*/public/ | ||
!apps/*/.next/ | ||
!apps/*/*.ts | ||
!apps/ |
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.
The line !apps/*/src/
looks to me like it should be sufficient to get the apps/web/src/*
directory allowed, but it wasn't working. To resolve, I added !apps/
and I'm calling it a day.
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.
I completely assumed that !apps/*/src
would expand to include any subdirectories so great catch!
@@ -45,7 +45,7 @@ jobs: | |||
with: | |||
context: . | |||
platforms: linux/amd64 | |||
file: Containerfile | |||
file: apps/web/Containerfile |
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.
The Containerfile
moved, but the build "content" did not: the context remains the repo root.
@@ -9,6 +9,7 @@ node_modules | |||
.env.development.local | |||
.env.test.local | |||
.env.production.local | |||
.envrc |
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.
I use a local .envrc
file sometimes to test connecting a locally-built container to a remote DB URL.
@@ -59,6 +62,6 @@ COPY --from=installer /app/apps/web/package.json . | |||
# https://nextjs.org/docs/advanced-features/output-file-tracing | |||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ | |||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static | |||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public | |||
# COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public |
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.
AFAICT the ./apps/web/public/
dir doesn't exist and doesn't need to exist: the app works well without it.
@@ -4,19 +4,22 @@ LABEL maintainer="[email protected]" | |||
|
|||
# provide pnpm globally for dep installing and building | |||
FROM alpine AS base | |||
ENV NEXT_TELEMETRY_DISABLED=1 |
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.
Porting this no-telem env var across all build stages...
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.
lol, great catch. Very obnoxious to keep track of.
Thanks for the PR and comments 👍 |
Follow-up to #167.