- Python 3.7.4
- Pipenv
- Postgree
- Install required packages
$ pipenv install
- Create database (if needed):
psql -U gitpod -c 'DROP DATABASE jobcore;'
psql -U gitpod -c 'CREATE DATABASE jobcore;'
psql -U gitpod -c 'CREATE EXTENSION unaccent;' -d jobcore
- Copy and rename
jobcore/.env.example
tojobcore/.env
and set environment variables - Generate a new Secret Key
$ pipenv run genkey
or$ openssl rand -base64 32
Run migrations: $ pipenv run migrate
Run django: $ pipenv run start
$ python3 manage.py reset
$ pipenv run seed [development|production]
$ pipenv run tests
Note: If you are running a particular test:
- For a particular test:
pytest api/tests/test_invites.py
Find static files:
python manage.py findstatic --verbosity 2 social-media/facebook.png
distribute==0.6.27
poster==0.8.1
wsgiref==0.1.2
heroku keys:add ~/.ssh/path/to/public/key
heroku config:set GITHUB_USERNAME=joesmith
heroku run python manage.py shell
git push heroku master
heroku git:remote -a jobcore
docker build -t jobcore/bd -f ./DockerfileForPostgres .
docker run -it -p 5432:5432 -h localhost --ip 127.0.0.1 jobcore/bd
docker build -t jobcore/app -f ./DockerfileForLiveReloadApp .
docker run -it -p 5000:5000 -v (pwd):/app jobcore/app
psql -U gitpod -c 'DROP DATABASE jobcore;'; psql -U gitpod -c 'CREATE DATABASE jobcore;'; psql -U gitpod -c 'CREATE EXTENSION unaccent;' -d jobcore; psql -U gitpod -c 'CREATE ROLE <role_name> WITH SUPERUSER'; pg_restore -c -d jobcore [dumpfile_name]
pipenv shell createsuperuser now enter username and password