This commit is contained in:
Raphael Rouiller
2024-07-08 14:06:52 +02:00
commit aa54287126
96 changed files with 2718 additions and 0 deletions

21
user/tools/init.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
LOGFILE="/home/archive/logs/setup.log"
echo "initialisation of Django" >> $LOGFILE
echo "backend name: $USER_SERVICE_NAME" >> $LOGFILE
echo "initialisation of the project $USER_SERVICE_NAME" >> $LOGFILE
echo "initialisation of Django done" >> $LOGFILE
cd /home/archive/$USER_SERVICE_NAME
echo "Waiting for postgres to get up and running..."
while ! nc -z db_archive 5434; do
echo "waiting for postgress to be listening..."
sleep 1
done
echo "PostgreSQL started"
pip install -U 'Twisted[tls,http2]'
python3 manage.py makemigrations
python3 manage.py migrate
daphne -b 0.0.0.0 -p 8003 user_auth_system.asgi:application