diff --git a/Dockerfile b/Dockerfile index 17125c3..41990f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ COPY parse_db_url.sh /usr/local/bin/parse_db_url.sh USER root RUN chmod 755 /usr/local/bin/parse_db_url.sh +RUN chmod a+rwx /var/lib/gitea/custom/conf/app.ini + USER 1000:1000 diff --git a/parse_db_url.sh b/parse_db_url.sh index 6e5f588..18d9007 100644 --- a/parse_db_url.sh +++ b/parse_db_url.sh @@ -5,5 +5,6 @@ export GITEA__database__USER=$(echo ${DATABASE_URL} | sed -r "s|.*://([^:]+):.*| export GITEA__database__PASSWD=$(echo ${DATABASE_URL} | sed -r "s|.*://[^:]+:([^@]+)@.*|\1|") export GITEA__database__HOST=$(echo ${DATABASE_URL} | sed -r "s|.*@([^:]+):.*|\1|") export GITEA__database__NAME=$(echo ${DATABASE_URL} | sed -r "s|.*:([0-9]+)/([^?]+).*|\2|") +printf "[database]\nDB_TYPE = postgres\n" > /var/lib/gitea/custom/conf/app.ini /usr/local/bin/gitea web -port $PORT