Skip to content

Commit

Permalink
fix: add missing healthcheck script
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Apr 29, 2021
1 parent 57b7c22 commit 5c5cb6e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -1212,13 +1212,14 @@ def buildDockerImage():
'pull': 'always',
'settings': {
'username': {
'from_secret': 'docker_username',
},
'password': {
'from_secret': 'docker_password',
},
'auto_tag': True,
'repo': 'owncloud/web',
'from_secret': 'docker_username',
},
'password': {
'from_secret': 'docker_password',
},
'auto_tag': True,
'dockerfile': 'docker/Dockerfile',
'repo': 'owncloud/web',
},
'when': {
'ref': {
Expand Down
1 change: 1 addition & 0 deletions Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LABEL maintainer="ownCloud GmbH <[email protected]>" \

RUN rm -f /var/lib/nginx/html/*

ADD docker/overlay /
ADD dist/ /var/lib/nginx/html

EXPOSE 8080
Expand Down
10 changes: 10 additions & 0 deletions docker/overlay/usr/bin/healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh

set -eo pipefail

URL=http://127.0.0.1:8080

wget --quiet --tries=1 --spider ${URL}
[ $? -ne 0 ] && exit 1

exit 0

0 comments on commit 5c5cb6e

Please sign in to comment.