More postdeploy circles
This commit is contained in:
parent
ddffce5711
commit
3cb8ce2183
@ -5,5 +5,6 @@ COPY CHECKS ${WORKDIR}
|
||||
|
||||
RUN mkdir -p /app/
|
||||
COPY predeploy.sh /app/
|
||||
COPY postdeploy.sh /app/
|
||||
|
||||
EXPOSE 3000
|
||||
|
3
app.json
3
app.json
@ -12,7 +12,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "bash /app/predeploy.sh"
|
||||
"predeploy": "bash /app/predeploy.sh",
|
||||
"postdeploy": "bash /app/postdeploy.sh"
|
||||
}
|
||||
},
|
||||
"volumes": [
|
||||
|
20
postdeploy.sh
Executable file
20
postdeploy.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
setup_letsencrypt_certs() {
|
||||
set -eu
|
||||
|
||||
if [ ! -d "/home/dokku/gitea/letsencrypt" ]; then
|
||||
echo "=====> Generating let's encrypt certificates"
|
||||
dokku letsencrypt gitea
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
setup_letsencrypt_certs
|
||||
}
|
||||
|
||||
main
|
Reference in New Issue
Block a user