Skip to content

Commit 8554e3b

Browse files
chore: add docker healthcheck to SIPI image (INFRA-130) (#2359)
1 parent 9907cdf commit 8554e3b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎build.sbt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ lazy val sipi: Project = Project(id = "sipi", base = file("sipi"))
110110
Universal / mappings ++= {
111111
directory("sipi/scripts")
112112
},
113+
dockerCommands += Cmd(
114+
"""HEALTHCHECK --interval=15s --timeout=5s --retries=3 --start-period=30s \
115+
|CMD bash /sipi/scripts/healthcheck.sh || exit 1""".stripMargin
116+
),
113117
// use filterNot to return all items that do NOT meet the criteria
114118
dockerCommands := dockerCommands.value.filterNot {
115119

‎sipi/scripts/healthcheck.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
curl -sS --fail 'http://localhost:1024/server/test.html'

0 commit comments

Comments
 (0)