Wallah ça marche mtn
continuous-integration/drone/push Build is passing Details

master
remrem 1 year ago
parent d665c3a2af
commit f10942a1ee

@ -2,7 +2,6 @@ kind: pipeline
type: docker
name: SmartFit_AI
trigger:
event:
- push
@ -10,7 +9,6 @@ trigger:
- master
steps:
# docker image build
- name: docker-build-and-push
image: plugins/docker
settings:
@ -22,8 +20,6 @@ steps:
password:
from_secret: jolys_username
# container deployment
- name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
@ -32,4 +28,4 @@ steps:
COMMAND: create
OVERWRITE: true
ADMINS: remiarnal,enzojolys,othmanebenjelloun
depends_on: ["docker-build-and-push"]
depends_on: ["docker-build-and-push"]

@ -1,33 +1,12 @@
FROM python:3.10
EXPOSE 80
WORKDIR /app
# Copier les fichiers nécessaires dans l'image
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
COPY . .
# Cron
RUN apt-get update && apt-get -y install cron
# Copier le script d'entrée
#COPY entrypoint.sh /app/entrypoint.sh
#RUN chmod +x /app/entrypoint.sh
RUN chmod 0644 /app/crontab
RUN crontab /app/crontab
RUN crontab -l
# Définir le point d'entrée de l'image
ENTRYPOINT ["service","cron","restart"]
# Python
RUN pip install -r requirements.txt
ENTRYPOINT ["cron","-f"]

@ -1,3 +1,2 @@
* * * * * python3 /app/testFinal.py
00 08 * * * python3 /app/generateurModele.py
*/1 * * * * python3 /app/generateurModele.py

@ -55,7 +55,7 @@ def sendJsonToApi(url,json):
# ---------------- Main ------------------- #
urlGetAllData = "https://codefirst.iut.uca.fr/containers/SmartFit-smartfit_api/ia/data"
urlGetAllData = "https://codefirst.iut.uca.fr/containers/SmartFit-smartfit_api/ai/data"
while(True):
logging.warning("Info - Début de la boucle")
jsonBack = { "Users" : []}

Loading…
Cancel
Save