This installation is for development purposes.
Install docker. If possible enable non-root docker execution. Otherwise you will need to prepend 'sudo' to each docker command.
Copy .env.example to .env, and enter values for those variables.
Following command will build the docker image and start the docker compose network. sudo
is not needed if you installed docker non-root.
sudo docker compose up
The python files are NOT embedded to the image. Instead, when you edit the files, they are automatically synched.
sudo docker exec -it fastapi /bin/bash
This will give you a nice bash shell that you can run following commands:
Apply database migrations:
python -m alembic upgrade head
Populate initial data:
python ./app/initial_data.py
Run tests:
pytest -x
http://127.0.0.1:8888/api/docs
sudo docker exec -it fastapi /bin/bash
alembic revision --autogenerate -m "message"