diff --git a/gitea/first_start.sh b/gitea/first_start.sh deleted file mode 100755 index 0ae878d..0000000 --- a/gitea/first_start.sh +++ /dev/null @@ -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 diff --git a/gitea/setup.sh b/gitea/setup.sh new file mode 100755 index 0000000..2404615 --- /dev/null +++ b/gitea/setup.sh @@ -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