v2.0.8 #156

Merged
PxlLoewe merged 24 commits from staging into release 2026-01-31 22:08:50 +00:00
2 changed files with 23 additions and 15 deletions
Showing only changes of commit 2638ad473f - Show all commits

View File

@@ -75,5 +75,6 @@ USER nextjs
# Expose the application port
EXPOSE 3000
ENV HOST=0.0.0.0
CMD ["node", "apps/dispatch/server.js"]

View File

@@ -1,9 +1,5 @@
FROM node:22-alpine AS base
ENV PNPM_HOME="/usr/local/pnpm"
ENV PATH="${PNPM_HOME}:${PATH}"
ARG NEXT_PUBLIC_HUB_URL
ARG NEXT_PUBLIC_HUB_SERVER_URL
ARG NEXT_PUBLIC_DISCORD_URL
@@ -16,13 +12,13 @@ ENV NEXT_PUBLIC_DISCORD_URL=${NEXT_PUBLIC_DISCORD_URL}
ENV NEXT_PUBLIC_MOODLE_URL=${NEXT_PUBLIC_MOODLE_URL}
ENV NEXT_PUBLIC_DISPATCH_URL=${NEXT_PUBLIC_DISPATCH_URL}
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN echo "NEXT_PUBLIC_DISCORD_URL=${NEXT_PUBLIC_DISCORD_URL}"
RUN pnpm add -g turbo@^2.5
FROM base AS builder
ENV PNPM_HOME="/usr/local/pnpm"
ENV PATH="${PNPM_HOME}:${PATH}"
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN pnpm add -g turbo@^2.5
RUN apk update
RUN apk add --no-cache libc6-compat
@@ -33,6 +29,13 @@ COPY . .
RUN turbo prune hub --docker
FROM base AS installer
ENV PNPM_HOME="/usr/local/pnpm"
ENV PATH="${PNPM_HOME}:${PATH}"
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN pnpm add -g turbo@^2.5
RUN apk update
RUN apk add --no-cache libc6-compat
@@ -44,21 +47,25 @@ RUN pnpm install
# Build the project
COPY --from=builder /usr/app/out/full/ .
RUN turbo run build
RUN turbo run build --filter=hub...
FROM base AS runner
FROM node:22-alpine AS runner
WORKDIR /usr/app
# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /usr/app/ ./
COPY --from=installer --chown=nextjs:nodejs /usr/app/apps/hub/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /usr/app/apps/hub/.next/static ./apps/hub/.next/static
COPY --from=installer --chown=nextjs:nodejs /usr/app/apps/hub/public ./apps/hub/public
USER nextjs
# Expose the application port
EXPOSE 3000
ENV HOST=0.0.0.0
CMD ["pnpm", "--dir", "apps/hub", "run", "start"]
CMD ["node", "apps/hub/server.js"]