-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from penumbra-zone/container-build-repair
ci: fix containerfile build for monorepo layout
- Loading branch information
Showing
4 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ node_modules | |
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.envrc | ||
|
||
# Testing | ||
coverage | ||
|
This file contains 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 |
---|---|---|
|
@@ -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 | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable pnpm | ||
RUN pnpm install turbo --global | ||
|
||
# prune package structure + code into out/ | ||
FROM base AS builder | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN apk add --no-cache libc6-compat | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine | ||
# to understand why libc6-compat might be needed. | ||
RUN apk update | ||
RUN apk add --no-cache libc6-compat | ||
# Set working directory | ||
WORKDIR /app | ||
COPY . . | ||
COPY . /app | ||
WORKDIR /app/apps/web | ||
RUN turbo prune --scope=cuiloa-app --docker | ||
|
||
# Install and build app | ||
|
@@ -26,7 +29,7 @@ RUN apk update | |
WORKDIR /app | ||
|
||
# Disable build time telemetry. | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
# grab dependencies | ||
COPY .gitignore .gitignore | ||
|
@@ -45,7 +48,7 @@ FROM alpine AS runner | |
WORKDIR /app | ||
|
||
# Disable telemetry. | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
# Don't run production as root | ||
RUN addgroup --system --gid 1001 nodejs | ||
|
@@ -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 | ||
|
||
CMD node apps/web/server.js |