Chore: Add Developer Documentation
Add Instructions for getting started from scratch Add command to create/run a database for dev/testing Specify Python version for pyenv Update requirements for nev versions of packages
This commit is contained in:
parent
9930bec65a
commit
cd2e4fca26
1
.python-version
Normal file
1
.python-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
3.9.0
|
22
README.md
22
README.md
@ -5,14 +5,30 @@ The AHosking.com API
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
1. `sudo apt install libpq-dev python-dev python3-psycopg2`
|
1. `sudo apt install libpq-dev python-dev python3-psycopg2`
|
||||||
1. `pip install virtualenv`
|
1. `pip install virtualenv`
|
||||||
1. `python3 -m virtualenv .env`
|
1. `python3 -m virtualenv .env`
|
||||||
1. Activate environment
|
1. Activate environment
|
||||||
`.\.env\Scripts\activate`
|
`.\.env\Scripts\activate`
|
||||||
1.
|
1. `export DEBUG=false`
|
||||||
|
1. `docker run --name api-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=api -e POSTGRES_DB=api -p 5432:5432 -d postgres`
|
||||||
|
1. ```
|
||||||
|
export DATABASE_HOST=localhost
|
||||||
|
export DATABASE_PORT=5432
|
||||||
|
export DATABASE_USER=api
|
||||||
|
export DATABASE_PASSWORD=mysecretpassword
|
||||||
|
export DATABASE_NAME=api
|
||||||
|
```
|
||||||
|
1. `python3 manage.py makemigrations`
|
||||||
|
1. `python3 manage.py migrate`
|
||||||
|
1. `python3 manage.py createsuperuser`
|
||||||
|
1. `python manage.py runserver 0.0.0.0:9000`
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
`pip3 install --upgrade --force-reinstall -r requirements.txt` will re-install requirements and upgrade based on requirements.txt
|
||||||
|
|
||||||
### Third-party
|
### Third-party
|
||||||
|
|
||||||
* https://pypi.org/project/django-3-jet/
|
- https://pypi.org/project/django-4-jet/
|
||||||
|
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
Loading…
Reference in New Issue
Block a user