Files
Project-Monitor/Dockerfile
2025-10-22 22:23:06 +02:00

35 lines
746 B
Docker

# Use an official Python image as the base
FROM python:3.12-slim
# Install Node.js, npm, and cron
RUN apt-get update && apt-get install -y \
curl \
cron \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Setup backend
WORKDIR /app/backend
ADD backend .
RUN python3 -m venv venv
RUN . /app/backend/venv/bin/activate && pip install -r requirements.txt
WORKDIR /app/frontend
ADD frontend .
RUN npm install
RUN npm run build
WORKDIR /app
COPY docker/* .
RUN chmod 0644 services.cron
RUN crontab services.cron
RUN chmod +x entry.sh
EXPOSE 8080 8000
# Command to start cron and the backend
CMD ["sh", "-c", "/app/entry.sh"]