An API to browse Uptime Service database.
Flask python application serving API endpoints to browse Delegation Program Uptime Service database.
- Docker
- Docker Compose
- just(optional)
The following environment variables need to be set to successfully launch the docker container:
# Delegation Program postgres db details
SNARK_HOST=
SNARK_PORT=
SNARK_USER=
SNARK_PASSWORD=
SNARK_DB=
# API host:port details to start listening to
API_HOST=
API_PORT=
SWAGGER_HOST=
# Misc
CACHE_TIMEOUT=
LOGGING_LOCATION=
This example assumes that you will use just
to spin up resources using docker-compose executing from the root of the repository
- If you have
just
installed, check available just recipes(from the root of git repo). You can inspect recipe definitions inJustfile
.
$ just
Available recipes:
default # List available recipes
build-api # Build leaderboard api docker image
destroy-api # Stop leaderboard-api
launch-api # Start leaderboard-api locally
<..>
- Copy and edit
.env
file
$ cp ./api/config_variables.env ./api/.env
- Try running and accessing it
$ just build-api
$ just launch-api