-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
42 lines (30 loc) · 926 Bytes
/
Dockerfile.dev
File metadata and controls
42 lines (30 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Development Dockerfile for Managarr
FROM node:18-alpine AS development
# Install dumb-init
RUN apk add --no-cache dumb-init
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY frontend/package*.json ./frontend/
COPY backend/package*.json ./backend/
# Install dependencies
RUN npm install && \
cd frontend && npm install && \
cd ../backend && npm install
# Create directories
RUN mkdir -p /app/config /app/data /app/logs
# Copy source code
COPY . .
# Expose ports
EXPOSE 3000 5000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD curl -f http://localhost:5000/api/health || exit 1
# Environment variables
ENV NODE_ENV=development
ENV FRONTEND_PORT=3000
ENV BACKEND_PORT=5000
# Use dumb-init
ENTRYPOINT ["dumb-init", "--"]
# Development command - runs both frontend and backend
CMD ["sh", "-c", "cd backend && npm run dev & cd frontend && npm start"]