do not set ROOT_URL, override DOMAIN instead

because ROOT_URL gets reset on restart from the evironment variables
This commit is contained in:
Earl Warren 2023-03-26 19:02:38 +02:00
parent 2ddaa24d8f
commit aefd5f2538
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -27,7 +27,6 @@ function run() {
-e "RUN_MODE=dev" \
-e "FORGEJO__security__INSTALL_LOCK=true" \
-e "FORGEJO__log__LEVEL=debug" \
-e "FORGEJO__server__ROOT_URL=http://0.0.0.0:3000/" \
-e "FORGEJO__actions__ENABLED=true" \
-e "FORGEJO__repository__ENABLE_PUSH_CREATE_USER=true" \
-e "FORGEJO__repository__DEFAULT_PUSH_CREATE_PRIVATE=false" \
@ -35,7 +34,7 @@ function run() {
-d $image
local ip="$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" forgejo)"
echo $ip > forgejo-ip
docker exec forgejo sed -i -e "s|/0.0.0.0:3000/|/$ip:3000/|" /data/gitea/conf/app.ini
docker exec forgejo sed -i -e "s|localhost|$ip|" /data/gitea/conf/app.ini
docker restart forgejo
}