2021-02-17 13:06:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
2024-03-02 15:30:51 +00:00
|
|
|
<<<<<<< HEAD
|
2024-03-02 14:19:36 +00:00
|
|
|
<<<<<<< HEAD
|
|
|
|
=======
|
|
|
|
# cat docker/settings_local.template.py | envsubst > re2o/settings_local.py
|
|
|
|
cp docker/settings_local.template.py re2o/settings_local.py
|
|
|
|
|
|
|
|
>>>>>>> 33bacb65 (Add decouple)
|
2024-03-02 15:30:51 +00:00
|
|
|
=======
|
|
|
|
# cat docker/settings_local.template.py | envsubst > re2o/settings_local.py
|
|
|
|
cp docker/settings_local.template.py re2o/settings_local.py
|
|
|
|
|
|
|
|
=======
|
|
|
|
>>>>>>> ab75f416 (Change the way the dev docker works)
|
|
|
|
>>>>>>> 907fc353 (Change the way the dev docker works)
|
2024-03-03 10:44:43 +00:00
|
|
|
cp -n cotisations/templates/cotisations/invoice.html templates/default_invoice.html
|
|
|
|
cp -n cotisations/templates/cotisations/voucher.html templates/default_voucher.html
|
2021-08-09 09:04:39 +00:00
|
|
|
|
2021-02-17 13:06:07 +00:00
|
|
|
AUTOMIGRATE=${AUTOMIGRATE:-yes}
|
|
|
|
|
|
|
|
if [ "$AUTOMIGRATE" != "skip" ]; then
|
2024-03-01 15:31:04 +00:00
|
|
|
<<<<<<< HEAD
|
2024-03-08 07:15:49 +00:00
|
|
|
poetry run python manage.py migrate --noinput
|
2024-03-01 15:31:04 +00:00
|
|
|
=======
|
|
|
|
poetry run python3 manage.py migrate --noinput
|
|
|
|
>>>>>>> a62566ef (premier essai)
|
2021-02-17 13:06:07 +00:00
|
|
|
fi
|
|
|
|
|
2024-03-03 10:25:12 +00:00
|
|
|
<<<<<<< HEAD
|
2024-03-08 09:05:24 +00:00
|
|
|
poetry run python manage.py collectstatic
|
|
|
|
poetry run python manage.py compilemessages
|
2024-03-03 10:25:12 +00:00
|
|
|
=======
|
|
|
|
poetry run python3 manage.py collectstatic
|
|
|
|
poetry run python3 manage.py compilemessages
|
|
|
|
>>>>>>> a58d4dca (update pip requirements)
|
2024-03-08 09:05:24 +00:00
|
|
|
|
2024-03-03 10:44:43 +00:00
|
|
|
cat <<EOF | poetry run python manage.py shell
|
2021-02-17 13:06:07 +00:00
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
|
|
|
User = get_user_model()
|
|
|
|
|
|
|
|
User.objects.filter(pseudo='$SUPERUSER_LOGIN').exists() or \
|
|
|
|
User.objects.create_superuser(pseudo='$SUPERUSER_LOGIN', email='$SUPERUSER_EMAIL', password='$SUPERUSER_PASS', surname='$SUPERUSER_LOGIN')
|
|
|
|
EOF
|
2024-03-03 10:44:43 +00:00
|
|
|
poetry run python manage.py runserver 0.0.0.0:8000
|