New postgres solution

This commit is contained in:
awieczarek 2024-10-20 13:49:01 +02:00
parent 41bea0ceac
commit 3e7777f202
2 changed files with 2 additions and 18 deletions

View File

@ -1,14 +1,8 @@
FROM gitea/gitea:1.14.5-rootless 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 ENV GITEA_CUSTOM=/var/lib/gitea/custom
ARG DATABASE_URL='db:5432' RUN eval $(echo $DATABASE_URL | sed -e 's/^postgres:\/\///' -e 's/@/ /' -e 's/:/ /' -e 's/\// /') \
ENV DATABASE_URL=${DATABASE_URL} && 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 COPY app.ini /var/lib/gitea/custom/conf/app.ini

10
app.ini
View File

@ -1,11 +1 @@
[database]
DB_TYPE = postgres
HOST = db:5432
NAME = gitea
USER = gitea
PASSWD = gitea
SSL_MODE = disable
[repository]
ROOT = /data/git/repositories