From c9105f300cfe969903d0f102587325637649674b Mon Sep 17 00:00:00 2001 From: awieczarek Date: Wed, 23 Oct 2024 12:39:24 +0200 Subject: [PATCH] Test --- Dockerfile | 5 +++++ parse_db_url.sh | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b05833..5e1fb5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,11 @@ 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 useradd -ms /bin/bash customuser && \ + chown -R customuser:customuser /var/lib/gitea/custom + +USER customuser + ENV DATABASE_URL=${DATABASE_URL} CMD ["/usr/local/bin/parse_db_url.sh"] diff --git a/parse_db_url.sh b/parse_db_url.sh index 858cdc3..6e5f588 100644 --- a/parse_db_url.sh +++ b/parse_db_url.sh @@ -1,7 +1,5 @@ #!/bin/sh -exec mkdir /var/lib/gitea/custom/conf - export GITEA__database__DB_TYPE=postgres export GITEA__database__USER=$(echo ${DATABASE_URL} | sed -r "s|.*://([^:]+):.*|\1|") export GITEA__database__PASSWD=$(echo ${DATABASE_URL} | sed -r "s|.*://[^:]+:([^@]+)@.*|\1|")