Skip to content

Advertise the version tag in presets API

Belén Torrente requested to merge versionapi into main

To test locally, you will need to define the version as an env variable:

cat <<EOF > .env
PRESETS_ENABLE_SSL=TRUE
PRESETS_BACKEND_PORT=4443
PRESETS_BACKEND_PORT_HTTP=80
EXTERNALADDRESS=https://localhost:4443/
OAUTH2_USERINFO=https://gitlab.com/oauth/userinfo
VERSION=somethingsomething
EOF

docker-compose up -d --build

You should be able to see the API call in action by using the /version endpoint through Docker:

belen@belen-knmi:~/devel/presets-backend/Docker$ curl -kL https://0.0.0.0:4443/version
{"version":"somethingsomething"}

To test in an actual branch: https://gwpresetsbe-dev-implementversionapi.geoweb.dev.knmi.cloud/version

You should be able to see something like:

// 20220726103952
// https://gwpresetsbe-dev-implementversionapi.geoweb.dev.knmi.cloud/version

{
  "version": "versionapi"
}

Ticket opengeoweb/opengeoweb#2312 (closed) cannot be closed until this one and the deploy-preset-backend MR have both been approved and merged.

Edited by Belén Torrente

Merge request reports