Fixed build var
All checks were successful
release-image / release-image (push) Successful in 10m16s

This commit is contained in:
Logan Cusano
2025-05-26 19:54:42 -04:00
parent f16099ba38
commit 12c0ca1177
2 changed files with 3 additions and 8 deletions

View File

@@ -57,4 +57,4 @@ jobs:
git.vpn.cusano.net/logan/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} git.vpn.cusano.net/logan/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
git.vpn.cusano.net/logan/${{ env.CONTAINER_NAME }}:${{ env.DOCKER_LATEST }} git.vpn.cusano.net/logan/${{ env.CONTAINER_NAME }}:${{ env.DOCKER_LATEST }}
build-args: | build-args: |
NEXT_PUBLIC_DRB_BASE_API_URL=${{ var.DRB_BASE_API_URL }} NEXT_PUBLIC_DRB_BASE_API_URL=${{ vars.DRB_BASE_API_URL }}

View File

@@ -3,14 +3,9 @@ FROM node:22-alpine AS deps
WORKDIR /app WORKDIR /app
# Install dependencies based on your package manager # Install dependencies based on your package manager
# If you use npm:
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
# If you use yarn:
# COPY package.json yarn.lock ./
# RUN yarn install --frozen-lockfile
# Stage 2: Build the Next.js application (production build) # Stage 2: Build the Next.js application (production build)
FROM node:22-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
@@ -19,9 +14,9 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
# Add an ARG for NEXT_PUBLIC_DRB_BASE_API_URL # Declare the build argument
ARG NEXT_PUBLIC_DRB_BASE_API_URL ARG NEXT_PUBLIC_DRB_BASE_API_URL
# Set it as an ENV variable for the build # Set the environment variable for the build stage from the build argument
ENV NEXT_PUBLIC_DRB_BASE_API_URL=${NEXT_PUBLIC_DRB_BASE_API_URL} ENV NEXT_PUBLIC_DRB_BASE_API_URL=${NEXT_PUBLIC_DRB_BASE_API_URL}
# Build the Next.js application for production # Build the Next.js application for production