Files
mtg-online-drafter/Dockerfile
dnviti 6f3c773dfd
Some checks failed
Build and Deploy / build (push) Failing after 2m44s
feat: Add Docker containerization, production serving, and Gitea CI/CD workflow.
2025-12-14 22:48:41 +01:00

28 lines
601 B
Docker

# Use Node.js LTS (Alpine for smaller size)
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package definition first to cache dependencies
COPY src/package.json src/package-lock.json ./
# Install dependencies
# Using npm install instead of ci to ensure updated package.json is respected
RUN npm install
# Copy the rest of the source code
COPY src/ ./
# Build the frontend (Production build)
RUN npm run build
# Remove development dependencies to keep image small
RUN npm prune --production
# Expose the application port
EXPOSE 3000
# Start the application
CMD ["npm", "start"]