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 type: docker
name: SmartFit_AI name: SmartFit_AI
trigger: trigger:
event: event:
- push - push
@ -10,7 +9,6 @@ trigger:
- master - master
steps: steps:
# docker image build
- name: docker-build-and-push - name: docker-build-and-push
image: plugins/docker image: plugins/docker
settings: settings:
@ -22,8 +20,6 @@ steps:
password: password:
from_secret: jolys_username from_secret: jolys_username
# container deployment
- name: deploy-container - name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment: environment:

@ -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

@ -55,7 +55,7 @@ def sendJsonToApi(url,json):
# ---------------- Main ------------------- # # ---------------- 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): while(True):
logging.warning("Info - Début de la boucle") logging.warning("Info - Début de la boucle")
jsonBack = { "Users" : []} jsonBack = { "Users" : []}

Loading…
Cancel
Save