Simple Django application proof of concept for a minimal, reusable user onboarding service using phone number and email as the primary identifers.
This assumes that you are running on any *nix environment and have Python 3.10+ and git installed in your local machine.
- Clone the repository
$ git clone git@github.com:ageeknamedslickback/onboardingServicePOC.git
$ cd onboardingServicePOC
- Create and activate a virtual environment to run your code
$ python3 -m venv <name of your venv>
$ source <name of your venv>/bin/activate
- Install dependancies
$ pip3 install -r requirements.txt
- Create an env.sh file and add the following
export SECRET_KEY="<your secret key>"
export DEBUG="true"
export ENVIRONMENT="local"
export PORT=8000
export SENTRY_DSN=""
- Remember to source your environment variables
$ source env.sh
- Run migrations (code uses SQLite thus no further configs), collectstatic and the runserver
$ python3 manage.py migrate
$ python3 manage.py collectstatic
$ python3 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
May 18, 2023 - 21:47:51
Django version 4.2.1, using settings 'config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
$ tox -r
This assumes that you have Docker Desktop installed locally in your *nix local machine
- Build the image
$ make build
- Run the docker container
$ make run