feat: Add Docker support with development and production configurations
This commit is contained in:
28
Dockerfile.dev
Normal file
28
Dockerfile.dev
Normal file
@@ -0,0 +1,28 @@
|
||||
# Development Dockerfile (for npm run dev)
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install all dependencies (including dev dependencies)
|
||||
RUN npm install
|
||||
|
||||
# Copy app source
|
||||
COPY . .
|
||||
|
||||
# Create directory for database
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Set environment to development and configure for external access
|
||||
ENV NODE_ENV=development
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
ENV PORT=3000
|
||||
|
||||
# Start the development server
|
||||
CMD ["npm", "run", "dev"]
|
||||
Reference in New Issue
Block a user