frontend: big upgrade

This commit is contained in:
tylen
2025-10-31 17:30:08 +02:00
parent 3f074e895d
commit 5baeee1f97
10 changed files with 90 additions and 49 deletions

29
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Use the official Node.js image.
FROM node:18 AS build
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json (or yarn.lock) to the working directory
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application
COPY . .
# Build the application
RUN npm run build
# Start a new stage to serve the application
FROM nginx:alpine
# Copy the build output to Nginx's public folder
COPY --from=build /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx when the container runs
CMD ["nginx", "-g", "daemon off;"]