Files
LeDiscord/backend/entrypoint.sh
EvanChal d68af8d5a1
Some checks failed
Deploy to Development / build-and-deploy (push) Has been cancelled
Deploy to Production / build-and-deploy (push) Successful in 33s
fix(dockerfile)
2026-01-28 20:47:34 +01:00

30 lines
731 B
Bash
Executable File

#!/bin/bash
set -e
echo "Running database migrations..."
alembic upgrade head
echo "Starting application..."
# Détecter l'environnement (production ou développement)
if [ "$ENVIRONMENT" = "production" ]; then
echo "Running in production mode..."
exec uvicorn app:app \
--host 0.0.0.0 \
--port 8000 \
--log-level info \
--proxy-headers \
--forwarded-allow-ips=*
else
echo "Running in development mode..."
exec uvicorn app:app \
--reload \
--reload-exclude "uploads/*" \
--reload-exclude "logs/*" \
--host 0.0.0.0 \
--port 8000 \
--log-level debug \
--proxy-headers \
--forwarded-allow-ips=*
fi