This commit is contained in:
asmigiel 2025-01-04 20:32:03 +01:00
parent cda5ceba97
commit 81ccf71742
4 changed files with 27 additions and 8 deletions

View File

@ -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"]

View File

@ -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

View File

@ -10,6 +10,3 @@ setup:
build: build:
docker: docker:
web: Dockerfile web: Dockerfile
run:
web: ./run.sh

7
run.sh
View File

@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
echo $APP_URL
echo DATABASE_URL
echo $DATABASE_URL
export DB_HOST=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/') export DB_HOST=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/')
export DB_USER=$(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/') export DB_PASSWORD=$(heroku config:get DATABASE_URL | sed 's/.*:\/\/.*:\(.*\)@.*/\1/')
@ -20,4 +25,4 @@ HTTP_PORT = ${PORT}
EOL EOL
/usr/bin/gitea web /usr/local/bin/gitea web --port $PORT