service-forgejo/scripts/usr.local.bin.forgejo

8 lines
363 B
Text
Raw Permalink Normal View History

2023-02-22 14:41:15 +00:00
#!/bin/sh
FORGEJO_CID=code.web.1
# FORGEJO_IP="$(docker inspect "$FORGEJO_CID" -f '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}')"
FORGEJO_IP="$(docker inspect "$FORGEJO_CID" -f '{{ .NetworkSettings.IPAddress }}' 2>/dev/null )"
ssh -T -p 22 -o StrictHostKeyChecking=no git@$FORGEJO_IP "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"