Update dockerfile
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -5,31 +5,28 @@ FROM python:3.12-slim
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
cron \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& 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
|
||||
COPY backend/* .
|
||||
ADD backend .
|
||||
RUN python3 -m venv venv
|
||||
RUN . /app/backend/venv/bin/activate && pip install -r requirements.txt
|
||||
|
||||
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
|
||||
ADD frontend .
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 5173
|
||||
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/docker/entry.sh"]
|
||||
CMD ["sh", "-c", "/app/entry.sh"]
|
||||
|
||||
Reference in New Issue
Block a user