feat: follow entrypoint orthodoxy

This commit is contained in:
decentral1se 2024-03-23 11:39:37 +01:00
parent 70ad6b8117
commit 59c07800a9
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
4 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,4 @@
export ENTRYPOINT_VERSION=v1
export HTPASSWD_CONF_VERSION=v1
export NGINX_CONF_VERSION=v1
export SSH_CONF_VERSION=v1

View File

@ -32,13 +32,16 @@ services:
- HUGO_WORKING_DIR=/root/website
- WHD_HOOK_SCRIPTS=/root/scripts
command: webhookd
entrypoint: /root/scripts/deploy.sh
entrypoint: /entrypoint.sh
networks:
- internal
configs:
- source: webhookd_script
target: /root/scripts/deploy.sh
mode: 0555
- source: entrypoint
target: /entrypoint.sh
mode: 0555
volumes:
- nginx-data:/usr/share/nginx/website
@ -59,3 +62,7 @@ configs:
name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION}
file: nginx.conf.tmpl
template_driver: golang
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang

View File

@ -36,5 +36,3 @@ cp -r $HUGO_WORKING_DIR/public/* $HUGO_PUBLIC_DIR
rm -rf $HUGO_WORKING_DIR/public/*
echo "▷ Sucessfully built new website!"
exit 0

7
entrypoint.sh.tmpl Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
bash /root/scripts/deploy.sh
exec "$@"