This commit is contained in:
awieczarek 2024-10-23 12:06:45 +02:00
parent 8a76c3e47d
commit b68433891e
4 changed files with 8 additions and 13 deletions

View File

@ -6,3 +6,11 @@ ADD config /etc/gitea
ADD data /var/lib/gitea ADD data /var/lib/gitea
ADD localtime /etc/localtime ADD localtime /etc/localtime
ADD timezone /etc/timezone ADD timezone /etc/timezone
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
ENTRYPOINT ["/usr/local/bin/parse_db_url.sh"]

View File

@ -1,7 +0,0 @@
[database]
DB_TYPE = postgres
HOST = db:5432
NAME = gitea
USER = gitea
PASSWD = gitea
SSL_MODE = require

View File

@ -16,6 +16,3 @@ build:
GITEA__database__NAME: gitea GITEA__database__NAME: gitea
GITEA__database__USER: gitea GITEA__database__USER: gitea
GITEA__database__PASSWD: gitea GITEA__database__PASSWD: gitea
run:
web: /usr/local/bin/gitea web -port $PORT

View File

@ -6,7 +6,4 @@ export GITEA__database__PASSWD=$(echo ${DATABASE_URL} | sed -r "s|.*://[^:]+:([^
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|")
echo $DATABASE_URL
echo $GITEA__database__NAME
exec /usr/local/bin/gitea web -port $PORT exec /usr/local/bin/gitea web -port $PORT