initial commit

This commit is contained in:
Marcin Kostrzewski 2022-11-15 20:10:19 +01:00
commit 0647fe0f02
5 changed files with 29 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM gitea/gitea:1.14.5-rootless
ADD config /etc/gitea
ADD data /var/lib/gitea
ADD localtime /etc/localtime
ADD timezone /etc/timezone
ADD run.sh /usr/local/bin/
ARG DATABASE_URL = 'db:5432'
ENV DATABASE_URL=${DATABASE_URL}
CMD ["/usr/local/bin/run.sh"]

9
heroku.yml Normal file
View File

@ -0,0 +1,9 @@
setup:
addons:
- plan: heroku-postgresql
as: DATABASE
build:
docker:
web: Dockerfile
run:
web: /usr/local/bin/run.sh

BIN
localtime Normal file

Binary file not shown.

6
run.sh Normal file
View File

@ -0,0 +1,6 @@
export GITEA__database__DB_TYPE=postgres
export GITEA__database__HOST=`echo $DATABASE_URL | grep -o "@.*/" | sed 's/.$//' | cut -c 2-`
export GITEA__database__NAME=`echo $DATABASE_URL | grep -o "/[[:alnum:]]*$" | cut -c 2-`
export GITEA__database__USER=`echo $DATABASE_URL | grep -o "//[a-z]*:" | grep -o "[a-z]*"`
export GITEA__database__PASSWD=`echo $DATABASE_URL | grep -o ":[[:alnum:]]*@" | grep -o "[[:alnum:]]*"`
./docker-entrypoint.sh

0
timezone Normal file
View File