This commit is contained in:
Leon
2025-07-15 22:54:35 +02:00
commit f7eda17284
89 changed files with 18535 additions and 0 deletions

37
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,37 @@
# Dockerfile for Next.js frontend
# 1. Build Stage
FROM node:24-alpine AS builder
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application
COPY . .
# Set the API URL for the build
ARG NEXT_PUBLIC_API_URL=/api
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
# Build the Next.js application
RUN npm run build
# 2. Production Stage
FROM node:24-alpine
WORKDIR /app
# Copy the built application from the builder stage
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
# Expose the port the app runs on
EXPOSE 3000
# Start the application
CMD ["npm", "start"]