Last active
October 18, 2019 14:27
-
-
Save ericvieira/73175dc644b1e6b5bd9ee483dbe629ed to your computer and use it in GitHub Desktop.
Script para criar um projeto Django e instalar as dependências básicas.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ] | |
then | |
echo "passe o nome do projeto como parametro, tipo: ./dj-script projeto" | |
else | |
mkdir $1 | |
cd $1 | |
python -m venv .$1 | |
source .$1/bin/activate | |
pip install --upgrade pip | |
pip install django | |
django-admin startproject $1 . | |
pip install python-decouple | |
pip install dj-database-url | |
pip install dj-static | |
pip install django-test-without-migrations | |
python manage.py startapp core | |
mv core $1 | |
pip freeze > requirements.txt | |
echo 'gunicorn==19.9.0' >> requirements.txt | |
echo 'psycopg2==2.8.3' >> requirements.txt | |
echo 'web: gunicorn projeto.wsgi --log-file - :' > Procfile | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment