1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00

Add watchtower hooks

This commit is contained in:
Rory Powell 2021-07-29 20:32:18 +01:00
parent 96d11ef07f
commit 648661877a
12 changed files with 20 additions and 0 deletions

View file

@ -7,3 +7,4 @@ public/
db/dev.db/
dist
coverage/
watchtower-hook.json

View file

@ -1,5 +1,10 @@
FROM node:12-alpine
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="scripts/watchtower-hooks/post-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="scripts/watchtower-hooks/post-check.sh"
WORKDIR /app
ENV PORT=4001

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "post-check" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "post-update" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-check" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-update" }' > 'watchtower-hook.json'

View file

@ -1,2 +1,3 @@
node_modules/
.env
watchtower-hook.json

View file

@ -1,5 +1,10 @@
FROM node:12-alpine
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="scripts/watchtower-hooks/post-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="scripts/watchtower-hooks/post-check.sh"
WORKDIR /app
# copy files and install dependencies

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "post-check" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "post-update" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-check" }' > 'watchtower-hook.json'

View file

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-update" }' > 'watchtower-hook.json'