This commit is contained in:
awieczarek 2024-10-23 12:49:39 +02:00
parent faaabd1200
commit d000f389e7
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,8 @@ COPY parse_db_url.sh /usr/local/bin/parse_db_url.sh
USER root USER root
RUN chmod 755 /usr/local/bin/parse_db_url.sh RUN chmod 755 /usr/local/bin/parse_db_url.sh
RUN chmod a+rwx /var/lib/gitea/custom/conf/app.ini
USER 1000:1000 USER 1000:1000

View File

@ -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__PASSWD=$(echo ${DATABASE_URL} | sed -r "s|.*://[^:]+:([^@]+)@.*|\1|")
export GITEA__database__HOST=$(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|") 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 /usr/local/bin/gitea web -port $PORT