- Create README.md for deployment instructions - Add .env file for environment variables - Add Caddyfile for reverse proxy configuration - Create docker-compose.yml for service orchestration
25 lines
382 B
Docker
25 lines
382 B
Docker
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files and install dependencies
|
|
COPY package*.json ./
|
|
RUN npm ci --only=production
|
|
|
|
# Copy application files
|
|
COPY src ./src
|
|
COPY static ./static
|
|
|
|
# Use non-root user
|
|
USER node
|
|
|
|
# Expose port
|
|
EXPOSE 6080
|
|
|
|
# Set environment variables
|
|
ENV NODE_ENV=production \
|
|
SERVER_PORT=6080
|
|
|
|
# Start the application
|
|
CMD ["node", "src/index.js"]
|