feat: private repos
This commit is contained in:
parent
dba79dc23b
commit
96c1ca1ee4
|
@ -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
|
||||
|
|
|
@ -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 "$@"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue