feat(gitea): ssh setup

This commit is contained in:
AngeD 2023-12-23 14:16:44 +01:00
parent fad2cac15b
commit e4d199f5e4
2 changed files with 19 additions and 7 deletions

View File

@ -1,7 +0,0 @@
#!/bin/bash -e
[ "$EUID" != 0 ] && { echo "This script need to run as root" >&2; exit 1; }
docker-compose up --no-start --build
chown -R 1000:1000 /var/lib/docker/volumes/gitea_*
docker-compose up -d --build

19
gitea/setup.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash -e
[ "$EUID" != 0 ] && { echo "This script need to run as root" >&2; exit 1; }
docker-compose up --no-start --build
chown -R 1000:1000 /var/lib/docker/volumes/gitea_*
docker-compose up -d --build
(
. ./.env
echo -n "\n\ngo to https://$BASE_URL, setup gitea and press enter\n\n"
read -r
)
sed -i -e "s/^SSH_PORT.*/SSH_PORT = $SSH_PORT/" \
-e 's/^SSH_LISTEN_PORT.*/SSH_LISTEN_PORT = 2222/' \
/var/lib/docker/volumes/gitea_config/_data/app.ini
docker-compose restart gitea