- adds a Dockerfile to build the app in container

- adds app to the docker-compose.yml file
This commit is contained in:
albert
2025-07-28 13:03:49 +02:00
parent 8c91d68b59
commit 90c6c8392f
2 changed files with 35 additions and 0 deletions

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
# Use Node.js 24 slim image
FROM node:24-slim
# Set working directory
WORKDIR /app
# Install dependencies first (for better caching)
COPY package*.json ./
RUN npm install
# Copy the rest of the code
COPY . .
# Build project (for production)
RUN npm run build
# Expose port if needed (optional, e.g., 3000)
EXPOSE 3000
# Run app in production mode
CMD ["node", "dist/index.js"]