24 lines
415 B
Bash
24 lines
415 B
Bash
#!/bin/sh
|
|
|
|
# si no existe directorio de ambiente, se crea
|
|
if [ ! -d ./libs ]; then
|
|
python -m venv libs
|
|
. ./libs/bin/activate
|
|
pip install -r requirements.txt
|
|
fi
|
|
|
|
# activar ambiente con dependencias
|
|
. ./libs/bin/activate
|
|
|
|
if [ ! -d ./project ]; then
|
|
django-admin startproject project
|
|
fi
|
|
|
|
if [ ! -f .env ]; then
|
|
cp .env.develop .env
|
|
fi
|
|
|
|
# iniciar servidor
|
|
python ./project/manage.py runserver 0.0.0.0:$PORT
|
|
|