feat: initial commit for MischCRM - full private custom personal relationship manager
This commit is contained in:
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# Base Image: Lightweight Node.js Alpine
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package descriptors first to leverage Docker layer caching
|
||||
COPY package.json ./
|
||||
|
||||
# Install production dependencies only
|
||||
RUN npm install --omit=dev
|
||||
|
||||
# Copy server code and public assets
|
||||
COPY server.js ./
|
||||
COPY public/ ./public/
|
||||
|
||||
# Create persistent storage folder for SQLite database
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# Environment configuration variables
|
||||
ENV PORT=8085
|
||||
ENV DATABASE_PATH=/app/data/crm.db
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Expose internal Express port
|
||||
EXPOSE 8085
|
||||
|
||||
# Define persistent volume directory for crm.db
|
||||
VOLUME ["/app/data"]
|
||||
|
||||
# Run server
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user