From 81ccf71742053fde10183c07bc2ad00d0f41c295 Mon Sep 17 00:00:00 2001 From: asmigiel Date: Sat, 4 Jan 2025 20:32:03 +0100 Subject: [PATCH] test --- Dockerfile | 12 ++++++++---- config/app.ini | 13 +++++++++++++ heroku.yml | 3 --- run.sh | 7 ++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1dff7ca..ada95b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ -FROM gitea/gitea:1.14.5-rootless +FROM gitea/gitea:1.14.5 -RUN mkdir -p /data/gitea +WORKDIR /app -EXPOSE 3000 +COPY run.sh ./ -CMD ["/usr/bin/gitea", "web"] +ENV GITEA_CUSTOM=/var/lib/gitea/custom + +RUN chmod +x ./run.sh + +ENTRYPOINT ["./run.sh"] diff --git a/config/app.ini b/config/app.ini index e69de29..d6fcae0 100644 --- a/config/app.ini +++ b/config/app.ini @@ -0,0 +1,13 @@ +[database] +NAME = gitea +DB_TYPE = postgres +USER = gitea +HOST = db:5432 +PASSWD = gitea + +[oauth2] +JWT_SECRET = clihxt5fuU2yaZwdPnTDxwarGNbnuLItEe7kd4fI0y0 + +[security] +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3MzUwNzQ5Mzl9.ZVn8jqgOjeR3WM_E6k8Oa9ZPvYUTK6nHeJNrg641fvM + diff --git a/heroku.yml b/heroku.yml index f6df591..ac503a8 100644 --- a/heroku.yml +++ b/heroku.yml @@ -10,6 +10,3 @@ setup: build: docker: web: Dockerfile - -run: - web: ./run.sh diff --git a/run.sh b/run.sh index a62d657..5fd560a 100644 --- a/run.sh +++ b/run.sh @@ -1,5 +1,10 @@ #!/bin/bash + +echo $APP_URL +echo DATABASE_URL +echo $DATABASE_URL + export DB_HOST=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/') export DB_USER=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/') export DB_PASSWORD=$(heroku config:get DATABASE_URL | sed 's/.*:\/\/.*:\(.*\)@.*/\1/') @@ -20,4 +25,4 @@ HTTP_PORT = ${PORT} EOL -/usr/bin/gitea web +/usr/local/bin/gitea web --port $PORT \ No newline at end of file