lisätty Dockerfile

This commit is contained in:
2026-03-21 10:43:25 +02:00
parent d756803942
commit 7161bfc190

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# Use an official Node.js runtime as the base image
FROM node:20-alpine
# Set the working directory in the container
WORKDIR /app
# Copy the package.json and package-lock.json files to the container
COPY package.json package-lock.json ./
# Install project dependencies
RUN npm install
# Copy the rest of the project files to the container
COPY . .
# Build the React app
RUN npm run build
# Expose the port that the server will listen on
EXPOSE 5173
# Start the application
CMD [ "npm", "run", "preview" ]