-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (30 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
42 lines (30 loc) · 1.05 KB
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
# Build frontend
FROM node:20-slim AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm ci || npm install
COPY frontend/ ./
RUN npm run build
# Build backend
FROM python:3.14.3-slim
WORKDIR /app
LABEL org.opencontainers.image.source=https://github.com/khw315/calendarr
LABEL org.opencontainers.image.description="Calendar feeds from Sonarr/Radarr to Discord and Slack"
LABEL org.opencontainers.image.licenses=GPL-3.0
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source code
COPY src/ /app/src/
# Copy public directory for web UI from frontend builder
COPY --from=frontend-builder /app/public/ /app/public/
# Copy and set up the entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Create logs directory
RUN mkdir -p /app/logs
ENV PYTHONUNBUFFERED=1
EXPOSE 5000
# Set the entrypoint script
ENTRYPOINT ["/app/entrypoint.sh"]
# Set the default command (will be executed by entrypoint's exec "$@")
CMD ["python", "src/app.py"]