Wallah ça marche mtn
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d665c3a2af
commit
f10942a1ee
@ -1,33 +1,12 @@
|
|||||||
FROM python:3.10
|
FROM python:3.10
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
# Copier les fichiers nécessaires dans l'image
|
# Cron
|
||||||
COPY requirements.txt .
|
|
||||||
COPY generateurModele.py .
|
|
||||||
COPY testFinal.py .
|
|
||||||
COPY crontab .
|
|
||||||
|
|
||||||
# Installer les dépendances
|
|
||||||
RUN pip install -r requirements.txt
|
|
||||||
|
|
||||||
# Créer le fichier de log
|
|
||||||
RUN touch /app/cron.log
|
|
||||||
|
|
||||||
# Donner les permissions nécessaires
|
|
||||||
RUN chmod 777 /app/crontab
|
|
||||||
|
|
||||||
# Installer le service cron
|
|
||||||
RUN apt-get update && apt-get -y install cron
|
RUN apt-get update && apt-get -y install cron
|
||||||
|
RUN chmod 0644 /app/crontab
|
||||||
# Copier le script d'entrée
|
|
||||||
#COPY entrypoint.sh /app/entrypoint.sh
|
|
||||||
#RUN chmod +x /app/entrypoint.sh
|
|
||||||
|
|
||||||
RUN crontab /app/crontab
|
RUN crontab /app/crontab
|
||||||
RUN crontab -l
|
RUN crontab -l
|
||||||
|
# Python
|
||||||
# Définir le point d'entrée de l'image
|
RUN pip install -r requirements.txt
|
||||||
ENTRYPOINT ["service","cron","restart"]
|
ENTRYPOINT ["cron","-f"]
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
* * * * * python3 /app/testFinal.py
|
*/1 * * * * python3 /app/generateurModele.py
|
||||||
00 08 * * * python3 /app/generateurModele.py
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue