attempt 5
Some checks failed
Deploy Frontend / deploy (push) Failing after 1m42s

This commit is contained in:
Lee 2024-10-03 19:53:39 +01:00
parent b09549b69f
commit d22a155a97
2 changed files with 23 additions and 1 deletions

@ -16,13 +16,24 @@ RUN turbo prune frontend --docker
# Add lockfile and package.json's of isolated subworkspace # Add lockfile and package.json's of isolated subworkspace
FROM base AS installer FROM base AS installer
RUN apk update RUN apk update
RUN apk add --no-cache libc6-compat RUN apk add --no-cache python3 make g++ gcc pkgconfig pixman cairo-dev libjpeg-turbo-dev pango-dev giflib-dev
WORKDIR /app WORKDIR /app
# First install the dependencies (as they change less often) # First install the dependencies (as they change less often)
COPY --from=builder /app/out/json/ . COPY --from=builder /app/out/json/ .
RUN pnpm install --frozen-lockfile --quiet RUN pnpm install --frozen-lockfile --quiet
# Add the commit hash
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
# Add the sentry auth token
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
# Build the project # Build the project
COPY --from=builder /app/out/full/ . COPY --from=builder /app/out/full/ .
RUN pnpm turbo run build --filter=frontend... RUN pnpm turbo run build --filter=frontend...
@ -30,6 +41,16 @@ RUN pnpm turbo run build --filter=frontend...
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
# Install runtime dependencies
RUN apk add --no-cache cairo pango libjpeg-turbo giflib
# Add the commit hash
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
# Don't run production as root # Don't run production as root
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser --system --uid 1001 nextjs

@ -9,6 +9,7 @@ const __dirname = path.dirname(__filename); // get the name of the directory
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: "standalone",
experimental: { experimental: {
webpackMemoryOptimizations: true, webpackMemoryOptimizations: true,
}, },