Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 2.07 KB

getting-started.md

File metadata and controls

44 lines (28 loc) · 2.07 KB

Getting started

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.

Prerequisites

  1. Install the version of Python specified in .python-version pyenv is one popular option for installing Python, or asdf.

  2. 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 -
  3. 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)

  4. You'll also need Docker Desktop installed and running.

Run the application

Note: Run everything from within the /app folder:

  1. Run make init start to build the image and start the container.
  2. Navigate to localhost:8080/docs to access the Swagger UI.
  3. Run make run-logs to see the logs of the running API container
  4. Run make stop when you are done to stop the container.

(Optional) Configure local secrets

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

Next steps

Now that you're up and running, read the application docs to familiarize yourself with the application.