All instructions are for MacOS
You will need
- Brew
- Python 3.11
- Poetry
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install pyenv
pyenv install 3.11
Set your python version before you install poetry
pyenv shell 3.11
Install Poetry
pip install poetry
brew install pre-commit
brew install postgresql@16
Instructions: https://github.com/mbucc/shmig
Add shmig folder to your path so that the shmig
executable is discoverable.
You will run these two commands every time you open a new shell environment for this project. The commands must be run in the project's root directory.
pyenv shell 3.11
poetry shell
poetry install --sync --with=dev
pre-commit install
uvicorn src.main:app --reload
or
poetry run start
You need to start the command by specifying an env. The program will look for a parameters.env.yaml file that matches the env
ENV=dev uvicorn src.main:app --reload
- The following instructions creates the superuser
createuser -s postgres
- Setup the database for test
cd scripts
DB_USER=test_user DB_PASSWORD=test_password DB_HOST=localhost ./initialize_postgres_db_local.sh test
DB_USER=test_user DB_PASSWORD=test_password DB_HOST=localhost ./run_all_migrations_local.sh test
- Setup the database for dev
cd scripts
DB_USER=dev_user DB_PASSWORD=dev_password DB_HOST=localhost ./initialize_postgres_db_local.sh
DB_USER=dev_user DB_PASSWORD=dev_password DB_HOST=localhost ./run_all_migrations_local.sh
create adequately secure key pair
ssh-keygen -m PKCS8 -t rsa -b 4096 -C "[email protected]"
convert public key to pem format
ssh-keygen -f key.pub -e -m PEM > key_pem.pub