mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Improve webhook behaviour for Gitea
Webhook execution in Gitea will now wait longer before returning, and Hugo will correctly set permissions on destination directories.
This commit is contained in:
parent
97f409de0b
commit
b7ca813a40
@ -60,6 +60,7 @@ REQUIRE_SIGNIN_VIEW = ${GITEA_REQUIRE_SIGNIN_VIEW}
|
|||||||
|
|
||||||
[webhook]
|
[webhook]
|
||||||
ALLOWED_HOST_LIST = 10.89.0.0/16
|
ALLOWED_HOST_LIST = 10.89.0.0/16
|
||||||
|
DELIVER_TIMEOUT = 60
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
|
@ -6,7 +6,6 @@ set -eu
|
|||||||
for t in rsa ecdsa ed25519; do
|
for t in rsa ecdsa ed25519; do
|
||||||
if test ! -f /etc/ssh/keys/ssh_host_${t}_key; then
|
if test ! -f /etc/ssh/keys/ssh_host_${t}_key; then
|
||||||
ssh-keygen -q -t $t -f /etc/ssh/keys/ssh_host_${t}_key -C '' -N '' > /dev/null
|
ssh-keygen -q -t $t -f /etc/ssh/keys/ssh_host_${t}_key -C '' -N '' > /dev/null
|
||||||
chown hugo:hugo /etc/ssh/keys/ssh_host_${t}_key*
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Host key type '$t' for SSH authentication:"
|
echo "Host key type '$t' for SSH authentication:"
|
||||||
@ -16,5 +15,9 @@ done
|
|||||||
# Create configuration file from collected templates.
|
# Create configuration file from collected templates.
|
||||||
envsubst < /etc/hugo/hooks.yaml.template > /etc/hugo/hooks.yaml
|
envsubst < /etc/hugo/hooks.yaml.template > /etc/hugo/hooks.yaml
|
||||||
|
|
||||||
|
# Correct permissions where needed.
|
||||||
|
chown hugo:hugo /etc/ssh/keys/ssh_host_*
|
||||||
|
chown -R hugo:hugo /build
|
||||||
|
|
||||||
# Run webhook listener for configured hooks.
|
# Run webhook listener for configured hooks.
|
||||||
gosu hugo /bin/webhook -verbose -port 8080 -hooks /etc/hugo/hooks.yaml
|
gosu hugo /bin/webhook -verbose -port 8080 -hooks /etc/hugo/hooks.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user