feat: private repos

This commit is contained in:
decentral1se 2024-03-23 13:25:32 +01:00
parent dba79dc23b
commit 96c1ca1ee4
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
4 changed files with 11 additions and 3 deletions

View File

@ -14,4 +14,5 @@ HUGO_GIT_URL=git@codeberg.org:offline/future.git
# Private repository deployment
#COMPOSE_FILE="compose.yml:compose.private.yml"
#PRIVATE_ENABLED=1
#SECRET_DEPLOY_KEY_VERSION=v1

View File

@ -2,6 +2,11 @@
set -e
{{ if eq (env "PRIVATE_ENABLED") "1" }}
eval $(ssh-agent -s)
ssh-add /root/.ssh/deploy
{{ end }}
bash /root/scripts/deploy.sh
exec "$@"

View File

@ -4,10 +4,11 @@ version: "3.8"
services:
badger:
configs:
- source: ssh_config
target: /home/webhookd/.ssh/config
- source: ssh_conf
target: /root/.ssh/config
- source: ssh_deploy_key
target: /home/webhookd/.ssh/deploy
target: /root/.ssh/deploy
mode: 0400
secrets:
- deploy_key

View File

@ -33,6 +33,7 @@ services:
- HUGO_GIT_URL
- HUGO_PUBLIC_DIR=/usr/share/nginx/website
- HUGO_WORKING_DIR=/root/website
- PRIVATE_ENABLED
- WHD_SCRIPTS=/root/scripts
command: webhookd
entrypoint: /entrypoint.sh