Docker on production + deployed on personnal server : everything working fine

This commit is contained in:
Grégoire Mureau 2025-08-13 14:17:34 +02:00
parent 9995183434
commit 42f940edf1
2 changed files with 19 additions and 20 deletions

View file

@ -683,4 +683,4 @@ st.markdown("""
Système de vision par ordinateur pour véhicules autonomes<br> Système de vision par ordinateur pour véhicules autonomes<br>
<small>Développé avec FastAPI, Streamlit et TensorFlow</small> <small>Développé avec FastAPI, Streamlit et TensorFlow</small>
</div> </div>
""", unsafe_allow_html=True) """, unsafe_allow_html=True)

View file

@ -2,19 +2,14 @@ version: '3.8'
services: services:
street-vision-api: street-vision-api:
# Pour développement local (build) # ✅ PRODUCTION: Image depuis Docker Hub
build: image: grgmdmn/street-vision_api:latest
context: .
dockerfile: Dockerfile
# Pour production (image Docker Hub)
# image: docker.io/VOTRE-USERNAME/street-vision_api:latest
container_name: street_vision_api container_name: street_vision_api
ports: ports:
- "${NGINX_PORT:-8080}:${NGINX_PORT:-8080}" # Port nginx configurable - "${NGINX_PORT:-8080}:${NGINX_PORT:-8080}" # Port nginx configurable
environment: environment:
# Configuration du port nginx # Configuration du port nginx
NGINX_PORT: "${NGINX_PORT:-8080}" NGINX_PORT: "${NGINX_PORT:-8080}"
@ -26,21 +21,25 @@ services:
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}" # clé secrète S3 AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}" # clé secrète S3
# Configuration email pour notifications (optionnel) # Configuration email pour notifications (optionnel)
SMTP_SERVER: "${SMTP_SERVER}" # serveur SMTP SMTP_SERVER: "${SMTP_SERVER:-}" # serveur SMTP
SMTP_PORT: "${SMTP_PORT}" # port SMTP (ex: 587) SMTP_PORT: "${SMTP_PORT:-587}" # port SMTP (ex: 587)
SMTP_EMAIL: "${SMTP_EMAIL}" # email expéditeur SMTP_EMAIL: "${SMTP_EMAIL:-}" # email expéditeur
SMTP_PASSWORD: "${SMTP_PASSWORD}" # mot de passe SMTP SMTP_PASSWORD: "${SMTP_PASSWORD:-}" # mot de passe SMTP
SMTP_FROM_ALIAS: "${SMTP_FROM_ALIAS}" # alias (optionnel) SMTP_FROM_ALIAS: "${SMTP_FROM_ALIAS:-Street Vision API}" # alias (optionnel)
ADMIN_EMAIL: "${ADMIN_EMAIL}" # email admin destinataire ADMIN_EMAIL: "${ADMIN_EMAIL:-}" # email admin destinataire
# URL de base de l'API (utilisée par Streamlit pour rediriger vers FastAPI) # 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 # Seulement si vous avez un reverse proxy server
# networks: # networks:
# - swag # - swag
restart: always restart: unless-stopped
# Seulement si vous avez un reverse proxy server # Seulement si vous avez un reverse proxy server
# networks: # networks: