Docker Update and Fixes

This commit is contained in:
2026-01-25 17:36:15 +00:00
parent b7b718d4ca
commit 295be1ed8e
21 changed files with 886 additions and 289 deletions

41
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build the SvelteKit app
RUN npm run build
# Production stage
FROM node:20-alpine AS production
WORKDIR /app
# Copy package.json for production dependencies
COPY package.json ./
# Install only production dependencies
RUN npm install --omit=dev
# Copy built files from builder
COPY --from=builder /app/build ./build
COPY --from=builder /app/server ./server
# Expose port
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
ENV PORT=3000
# Start the server
CMD ["node", "server/index.js"]