From 3e7777f2022674e311bb9ba8b3d52f19db587d7e Mon Sep 17 00:00:00 2001 From: awieczarek Date: Sun, 20 Oct 2024 13:49:01 +0200 Subject: [PATCH] New postgres solution --- Dockerfile | 10 ++-------- app.ini | 10 ---------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2bb1cab..f8984c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,8 @@ FROM gitea/gitea:1.14.5-rootless -ENV GITEA__database__DB_TYPE=postgres -ENV GITEA__database__HOST=${DATABASE_HOST} -ENV GITEA__database__NAME=${DATABASE_DB} -ENV GITEA__database__USER=${DATABASE_USER} -ENV GITEA__database__PASSWD=${DATABASE_PASSWORD} - ENV GITEA_CUSTOM=/var/lib/gitea/custom -ARG DATABASE_URL='db:5432' -ENV DATABASE_URL=${DATABASE_URL} +RUN eval $(echo $DATABASE_URL | sed -e 's/^postgres:\/\///' -e 's/@/ /' -e 's/:/ /' -e 's/\// /') \ + && export DATABASE_HOST=$2 && export DATABASE_USER=$1 && export DATABASE_PASSWORD=$3 && export DATABASE_DB=$5 COPY app.ini /var/lib/gitea/custom/conf/app.ini diff --git a/app.ini b/app.ini index 52ed2f4..8b13789 100644 --- a/app.ini +++ b/app.ini @@ -1,11 +1 @@ -[database] -DB_TYPE = postgres -HOST = db:5432 -NAME = gitea -USER = gitea -PASSWD = gitea -SSL_MODE = disable - -[repository] -ROOT = /data/git/repositories