Start working on containerization

This commit is contained in:
Sami Abuzakuk
2025-10-12 15:33:28 +02:00
parent b76cef22ae
commit a6f93edf72
4 changed files with 60 additions and 0 deletions

35
Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
# 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_18.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Setup backend
WORKDIR /app/backend
COPY backend/* .
RUN pip install -r requirements.txt
# Setup frontend
WORKDIR /app/frontend
COPY frontend/* .
# Setup docker
WORKDIR /app/docker
COPY docker/* /app/docker/
RUN chmod +x entry.sh
RUN chmod 0644 cronfile
WORKDIR /app
EXPOSE 5173
# Command to start cron and the backend
CMD ["sh", "-c", "/app/docker/entry.sh"]