Files
admin 0a4ba2001b Changes to be committed:
modified:   .env.example
	new file:   compta/__pycache__/__init__.cpython-310.pyc
	new file:   compta/__pycache__/admin.cpython-310.pyc
	new file:   compta/__pycache__/apps.cpython-310.pyc
	new file:   compta/__pycache__/models.cpython-310.pyc
	modified:   compta/admin.py
	new file:   compta/categories_indy.py
	modified:   compta/indy.py
	modified:   compta/management/commands/seed_reference.py
	new file:   compta/migrations/0010_categorie_compte_pcg.py
	modified:   compta/models.py
	modified:   compta/templates/compta/base.html
	new file:   compta/templates/compta/gestion.html
	modified:   compta/urls.py
	new file:   compta/views_gestion.py
	new file:   config/__pycache__/__init__.cpython-310.pyc
	new file:   config/__pycache__/settings.cpython-310.pyc
	modified:   config/settings.py
	modified:   entrypoint.sh
2026-07-11 20:27:51 +02:00

25 lines
848 B
Bash

#!/bin/sh
set -e
echo "→ Migrations de la base..."
python manage.py migrate --noinput
echo "→ Données de référence (barèmes + catégories)..."
python manage.py seed_reference || true
# Création automatique d'un compte admin si les variables sont fournies
if [ -n "$DJANGO_SUPERUSER_USERNAME" ] && [ -n "$DJANGO_SUPERUSER_PASSWORD" ]; then
echo "→ Vérification du compte admin..."
python manage.py createsuperuser --noinput 2>/dev/null || true
fi
# Chargement optionnel des données d'exemple (barèmes + catégories + démo)
if [ "$SEED_DEMO" = "1" ]; then
echo "→ Chargement des données d'exemple..."
python manage.py seed_demo || true
fi
echo "→ Démarrage de Gunicorn sur :8000"
exec gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 60 \
--forwarded-allow-ips="*" --proxy-allow-from="*"