fix: add healthz endpoint to nginx image
All checks were successful
Build & Deploy / build (push) Successful in 17s
All checks were successful
Build & Deploy / build (push) Successful in 17s
This commit is contained in:
@@ -28,7 +28,7 @@ jobs:
|
||||
{
|
||||
"name": "demo-frontend",
|
||||
"version": "1.0.0",
|
||||
"scripts": {"build": "mkdir -p dist && echo '<html><body style=\"font-family:sans-serif;padding:40px;text-align:center\"><h1>Demo Frontend</h1><p>Build: ${SHORT_SHA}</p><p>Commit: ${GITHUB_SHA}</p><p>Time: \$(date)</p></body></html>' > dist/index.html"}
|
||||
"scripts": {"build": "mkdir -p dist && echo '<html><body style=\"font-family:sans-serif;padding:40px;text-align:center\"><h1>Demo Frontend</h1><p>Build: ${SHORT_SHA}</p><p>Commit: ${GITHUB_SHA}</p><p>Time: $(date)</p></body></html>' > dist/index.html && echo 'OK' > dist/healthz"}
|
||||
}
|
||||
EOF
|
||||
|
||||
@@ -36,6 +36,7 @@ jobs:
|
||||
FROM nginx:alpine
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
EXPOSE 80
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O- http://localhost/healthz || exit 1
|
||||
EOF
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user