Skip to content

Commit

Permalink
chore: add docker healthcheck to SIPI image (INFRA-130) (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBoerlin committed Jan 5, 2023
1 parent 9907cdf commit 8554e3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.sbt
Expand Up @@ -110,6 +110,10 @@ lazy val sipi: Project = Project(id = "sipi", base = file("sipi"))
Universal / mappings ++= {
directory("sipi/scripts")
},
dockerCommands += Cmd(
"""HEALTHCHECK --interval=15s --timeout=5s --retries=3 --start-period=30s \
|CMD bash /sipi/scripts/healthcheck.sh || exit 1""".stripMargin
),
// use filterNot to return all items that do NOT meet the criteria
dockerCommands := dockerCommands.value.filterNot {

Expand Down
3 changes: 3 additions & 0 deletions sipi/scripts/healthcheck.sh
@@ -0,0 +1,3 @@
#!/bin/bash

curl -sS --fail 'http://localhost:1024/server/test.html'

0 comments on commit 8554e3b

Please sign in to comment.