From 42f940edf14cbe49fbf9e50d4d0d52013241ceb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20MUREAU?= Date: Wed, 13 Aug 2025 14:17:34 +0200 Subject: [PATCH] Docker on production + deployed on personnal server : everything working fine --- app/streamlit_app.py | 2 +- docker-compose.yml.example | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/streamlit_app.py b/app/streamlit_app.py index 6f9a090..bbe20e7 100644 --- a/app/streamlit_app.py +++ b/app/streamlit_app.py @@ -683,4 +683,4 @@ st.markdown(""" Système de vision par ordinateur pour véhicules autonomes
Développé avec FastAPI, Streamlit et TensorFlow -""", unsafe_allow_html=True) \ No newline at end of file +""", unsafe_allow_html=True) diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 0e66a27..b5f8514 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -2,19 +2,14 @@ version: '3.8' services: street-vision-api: - # Pour développement local (build) - build: - context: . - dockerfile: Dockerfile - - # Pour production (image Docker Hub) - # image: docker.io/VOTRE-USERNAME/street-vision_api:latest - + # ✅ PRODUCTION: Image depuis Docker Hub + image: grgmdmn/street-vision_api:latest + container_name: street_vision_api - + ports: - "${NGINX_PORT:-8080}:${NGINX_PORT:-8080}" # Port nginx configurable - + environment: # Configuration du port nginx NGINX_PORT: "${NGINX_PORT:-8080}" @@ -26,21 +21,25 @@ services: AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}" # clé secrète S3 # Configuration email pour notifications (optionnel) - SMTP_SERVER: "${SMTP_SERVER}" # serveur SMTP - SMTP_PORT: "${SMTP_PORT}" # port SMTP (ex: 587) - SMTP_EMAIL: "${SMTP_EMAIL}" # email expéditeur - SMTP_PASSWORD: "${SMTP_PASSWORD}" # mot de passe SMTP - SMTP_FROM_ALIAS: "${SMTP_FROM_ALIAS}" # alias (optionnel) - ADMIN_EMAIL: "${ADMIN_EMAIL}" # email admin destinataire + SMTP_SERVER: "${SMTP_SERVER:-}" # serveur SMTP + SMTP_PORT: "${SMTP_PORT:-587}" # port SMTP (ex: 587) + SMTP_EMAIL: "${SMTP_EMAIL:-}" # email expéditeur + SMTP_PASSWORD: "${SMTP_PASSWORD:-}" # mot de passe SMTP + SMTP_FROM_ALIAS: "${SMTP_FROM_ALIAS:-Street Vision API}" # alias (optionnel) + ADMIN_EMAIL: "${ADMIN_EMAIL:-}" # email admin destinataire # URL de base de l'API (utilisée par Streamlit pour rediriger vers FastAPI) - MULTISEG_API_BASE_URL: "${MULTISEG_API_BASE_URL}" # ex: https://vision.domain.com/api + MULTISEG_API_BASE_URL: "${MULTISEG_API_BASE_URL}" # ex: https://vision.domain.com/api + + # Pour une mise à jour automatique par watchtower + labels: + com.centurylinklabs.watchtower.enable: "true" # Seulement si vous avez un reverse proxy server # networks: # - swag - - restart: always + + restart: unless-stopped # Seulement si vous avez un reverse proxy server # networks: