add venv creation to script, add to readme and gitignore

This commit is contained in:
mcbloch 2019-04-01 23:42:59 +02:00
parent 94a8e2e12c
commit c249bdcbd4
3 changed files with 10 additions and 4 deletions

1
.gitignore vendored
View file

@ -8,6 +8,7 @@ __pycache__/
# Distribution / packaging # Distribution / packaging
.Python .Python
env/ env/
venv/
build/ build/
develop-eggs/ develop-eggs/
dist/ dist/

View file

@ -18,4 +18,4 @@ Local hosting steps
7. Run `python haldis.py runserver` 7. Run `python haldis.py runserver`
--- ---
Or run `./localhost.sh` in the root of the git folder (in linux) Or run `./first-setup.sh` in the root of the git folder (in linux)

View file

@ -1,11 +1,16 @@
#!/bin/bash #!/bin/bash
# A simple file to run all instructions from the README # A simple file to run all instructions from the README
## this should be run in the root of the repository ## this should be run in the root of the repository
pip3 install -r requirements.txt
if [ ! -d "vent" ]; then
python -m venv venv
fi
venv/bin/pip install -r requirements.txt
cd app cd app
cp config.example.py config.py cp config.example.py config.py
cp -t . database/* cp -t . database/*
python3 create_database.py venv/bin/python create_database.py
rm -f add_* create_database.py rm -f add_* create_database.py
python3 haldis.py runserver venv/bin/python haldis.py runserver
cd .. cd ..