Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shuttering the service #156

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Shuttering the service #156

wants to merge 1 commit into from

Conversation

PaulCDurham
Copy link
Contributor

A simple shuttering of the service by adding a router we can configure in place of the prod router.

We configure the router with the configuration item play.http.router. In production this is prod.Routes and in other environments it is testOnlyDoNotUseInAppConf.Routes. In this branch it has been changed in build.sbt to shutter.Routes. See line 37. You can change it back to testOnlyDoNotUseInAppConf.Routes and the service will work as normal.

You can test this using sbt run and visiting the service locally on port 9000.

The shutter router basically routes every request on /api-hub to some static content that states the service is down for maintenance. It is actually both a router and a controller.

We still want to serve up health and metrics endpoints while shuttered.

@platops-pr-bot
Copy link

  • uk.gov.hmrc.sbt-auto-build can be updated to 3.17.0 in project/plugins.sbt
  • There is a bobby warning (builds will be prevented after 31 May 2024) - see the pr builder for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants