Skip to content

cci-toast/backend

Repository files navigation

Toast Backend

Build Status: .github/workflows/main.yml Coverage Status

Development Set up

  • git clone this repo
  • Install docker
  • Check the version by docker --version
  • Make sure Docker desktop is running
  • cd into /backend. This is the project root.
  • Create an .env.dev file to store the environment variables which can be copied over (Check the Docker Setup for Development section in the Release Notes)

Build and Test Workflow

Build and Run the Docker container

  • Open a terminal in the project's root directory, to build and run the container
make build
  • You can browse the Swagger docs to view the api once authenticated
  • The Django app will be hosted on http://0.0.0.0:8000/

Run Test Suite with Coverage

  • Open a second terminal and run:
make test

Stop and Purge all the containers

Stop all containers:

docker container stop $(docker container ls -aq)

Remove all containers:

docker container rm $(docker container ls -aq)

Handling data migrations in local docker container

In case you have changes to migrate:

make migration
make migrate