Sistema_Gestion_Transporte/docker/install.sh

24 lines
446 B
Bash
Raw Permalink Normal View History

2023-06-15 21:11:36 -04:00
#!/bin/sh
2023-08-21 12:18:48 -04:00
cd /app
export PYTHONUSERBASE=/root/.local
2023-06-15 21:11:36 -04:00
# si no existe directorio de ambiente, se crea
2023-08-21 12:18:48 -04:00
if [[ ! -d /root/.local/bin ]]; then
pip install --user -r /app/myproject/requirements.txt
fi
if [[ ! -d ./myproject ]]; then
django-admin startproject myproject
2023-06-15 21:11:36 -04:00
fi
2023-08-21 12:18:48 -04:00
chmod o+w -R myproject/
2023-06-15 21:11:36 -04:00
2023-08-21 12:18:48 -04:00
if [[ ! -f .env ]] && [[ -f .env.develop ]]; then
2023-06-15 21:11:36 -04:00
cp .env.develop .env
fi
# iniciar servidor
2023-08-21 12:18:48 -04:00
python myproject/manage.py runserver 0.0.0.0:$PORT