Files
balikci/backend/Dockerfile.dev

38 lines
688 B
Docker
Raw Normal View History

2025-11-11 04:30:25 +03:00
# Backend Development Dockerfile
# Hot reload enabled with nodemon
FROM node:20-alpine
# Install required packages
RUN apk add --no-cache \
sqlite \
tini
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install all dependencies (including dev)
RUN npm install
# Copy application code
COPY . .
2025-11-11 04:36:35 +03:00
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
2025-11-11 04:30:25 +03:00
# Create necessary directories
RUN mkdir -p database logs
# Expose port
EXPOSE 3000
2025-11-11 04:36:35 +03:00
# Use tini and custom entrypoint
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
2025-11-11 04:30:25 +03:00
# Start with nodemon for hot reload
CMD ["npm", "run", "dev"]