This commit is contained in:
awieczarek 2024-10-23 12:29:23 +02:00
parent 85546a29a1
commit a2cc89f0ec
3 changed files with 3 additions and 4 deletions

View File

@ -10,6 +10,7 @@ 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
ENV DATABASE_URL=${DATABASE_URL}
RUN /usr/local/bin/parse_db_url.sh CMD ["/usr/local/bin/parse_db_url.sh"]

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,3 +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|")
/usr/local/bin/gitea web -port $PORT