From d000f389e7affa9a399c561833f1f754034c04b2 Mon Sep 17 00:00:00 2001 From: awieczarek Date: Wed, 23 Oct 2024 12:49:39 +0200 Subject: [PATCH] Test --- Dockerfile | 2 ++ parse_db_url.sh | 1 + 2 files changed, 3 insertions(+) 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