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
|
# Private repository deployment
|
||||||
#COMPOSE_FILE="compose.yml:compose.private.yml"
|
#COMPOSE_FILE="compose.yml:compose.private.yml"
|
||||||
|
#PRIVATE_ENABLED=1
|
||||||
#SECRET_DEPLOY_KEY_VERSION=v1
|
#SECRET_DEPLOY_KEY_VERSION=v1
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
{{ if eq (env "PRIVATE_ENABLED") "1" }}
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
ssh-add /root/.ssh/deploy
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
bash /root/scripts/deploy.sh
|
bash /root/scripts/deploy.sh
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
|
@ -4,10 +4,11 @@ version: "3.8"
|
||||||
services:
|
services:
|
||||||
badger:
|
badger:
|
||||||
configs:
|
configs:
|
||||||
- source: ssh_config
|
- source: ssh_conf
|
||||||
target: /home/webhookd/.ssh/config
|
target: /root/.ssh/config
|
||||||
- source: ssh_deploy_key
|
- source: ssh_deploy_key
|
||||||
target: /home/webhookd/.ssh/deploy
|
target: /root/.ssh/deploy
|
||||||
|
mode: 0400
|
||||||
secrets:
|
secrets:
|
||||||
- deploy_key
|
- deploy_key
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ services:
|
||||||
- HUGO_GIT_URL
|
- HUGO_GIT_URL
|
||||||
- HUGO_PUBLIC_DIR=/usr/share/nginx/website
|
- HUGO_PUBLIC_DIR=/usr/share/nginx/website
|
||||||
- HUGO_WORKING_DIR=/root/website
|
- HUGO_WORKING_DIR=/root/website
|
||||||
|
- PRIVATE_ENABLED
|
||||||
- WHD_SCRIPTS=/root/scripts
|
- WHD_SCRIPTS=/root/scripts
|
||||||
command: webhookd
|
command: webhookd
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
|
|
Loading…
Reference in New Issue