Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hrsystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
hrsystem
Commits
d41df5f1
Commit
d41df5f1
authored
Apr 02, 2026
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Dockerfile.frontend via Son of Anton
parent
51958eda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
Dockerfile.frontend
Dockerfile.frontend
+30
-11
No files found.
Dockerfile.frontend
View file @
d41df5f1
FROM node:20-alpine AS base
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /
app
WORKDIR /
build
# Copy everything needed
COPY frontend/package*.json ./
# Copy shared
COPY shared/ ./shared/
# Install frontend deps
COPY frontend/package.json frontend/package-lock.json* ./frontend/
WORKDIR /build/frontend
RUN npm install --legacy-peer-deps
COPY frontend/ ./
COPY shared/ ../shared/
# Copy frontend source
WORKDIR /build
COPY frontend/ ./frontend/
WORKDIR /build/frontend
ENV NEXT_TELEMETRY_DISABLED=1
# Build needs env vars at build time for Next.js
ARG NEXT_PUBLIC_API_URL
ARG NEXT_PUBLIC_WS_URL
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_WS_URL=$NEXT_PUBLIC_WS_URL
RUN npm run build
# Production
FROM node:20-alpine AS runner
# ---- Production ----
FROM node:20-alpine
RUN apk add --no-cache libc6-compat
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=b
ase /app
/.next/standalone ./
COPY --from=b
ase /app
/.next/static ./.next/static
COPY --from=b
ase /app/public ./public
COPY --from=b
uilder /build/frontend
/.next/standalone ./
COPY --from=b
uilder /build/frontend
/.next/static ./.next/static
COPY --from=b
uilder /build/frontend/public ./public 2>/dev/null || true
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:3000/ || exit 1
CMD ["node", "server.js"]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment