Prerequisites: Install Diesel CLI locally to use make file nigration
HOW TO RUN:
$ make db-up
$ make db-migrate
$ make run
This Dockerfile requires BuildKit and buildx. BuildKit is an improved backend to replace the legacy builder. BuildKit is the default builder for users on Docker Desktop, and Docker Engine as of version 23.0.
Enable it by setting:
export DOCKER_BUILDKIT=1
To build the image, use:
docker build . -t kudos-api
docker run -e DATABASE_URL=... -e HOST=... -e PORT=... kudos-api
It builds the image if it's the first time, otherwise, it uses the latest built image.
docker-compose up
docker-compose up --build
Run the command:
make test
These tests needs a real postgres DB running. You can start a new one using docker-compose up db
and then running the tests:
make test-db
Note: the tests will delete some tables before running. Use a dummy DB!
This repository is connected to render.com and will trigger a new deployment to production when a new commit arrives in main branch.