Déploiement¶
Checklist pré-prod¶
DJANGO_DEBUG = falseSECRET_KEYdéfiniALLOWED_HOSTS/CSRF_TRUSTED_ORIGINSconfigurésMigrations appliquées
collectstatic exécuté
Sentry activé (optionnel mais recommandé)
Procédure “manuelle” (référence)¶
Build image
docker build --build-arg GIT_SHA=$(git rev-parse HEAD) -t $DOCKER_REPO:$TAG .Push
docker push $DOCKER_REPO:$TAGMigrations
python manage.py migrate(via job/run sur la plateforme)Collectstatic
python manage.py collectstatic --noinputRun Gunicorn
gunicorn oc_lettings_site.wsgi:application -b 0.0.0.0:8000
Healthchecks & rollback¶
Endpoint /health (à ajouter si besoin).
Historiser les images (tag SHA) pour rollback rapide.