This application is dockerized. Take a look at Dockerfile to see how it works.
A very simple docker-compose.yml has been included to support local development and deployment. Take a look at docker-compose.yml for more information.
-
Install the version of Python specified in .python-version pyenv is one popular option for installing Python, or asdf.
-
After installing and activating the right version of Python, install poetry and follow the instructions to add poetry to your path if necessary.
curl -sSL https://install.python-poetry.org | python3 -
-
If you are using an M1 Mac, you will need to install Postgres as well:
brew install postgresql
(The psycopg2-binary is built from source on M1 Macs which requires the Postgres executable to be present) -
You'll also need Docker Desktop installed and running.
Note: Run everything from within the /app
folder:
- Run
make init start
to build the image and start the container. - Navigate to
localhost:8080/docs
to access the Swagger UI. - Run
make run-logs
to see the logs of the running API container - Run
make stop
when you are done to stop the container.
If you need to pass secrets to the application via environment variables, copy the provided /app/docker-compose.override.yml.example to /app/docker-compose.override.yml
. Then create an /app/.env
file with your secrets. The override will pass this file to the Docker container with your application.
cp docker-compose.override.yml.example docker-compose.override.yml
touch app/.env
Now that you're up and running, read the application docs to familiarize yourself with the application.