Compare commits

...

10 Commits

Author SHA1 Message Date
awieczarek
8a76c3e47d Manual app.ini 2024-10-20 17:04:33 +02:00
awieczarek
99616911d9 Test 2024-10-20 16:35:36 +02:00
awieczarek
0b2ef1b781 Test 2024-10-20 16:24:07 +02:00
awieczarek
86065ca11d Test 2024-10-20 16:21:36 +02:00
awieczarek
d33294d0ff Test 2024-10-20 16:19:41 +02:00
awieczarek
949e8d8696 Test 2024-10-20 16:06:54 +02:00
awieczarek
dd33b15296 Test 2024-10-20 16:04:26 +02:00
awieczarek
0e7a4062c2 Test 2024-10-20 15:38:15 +02:00
awieczarek
4f3bde14e4 Test 2024-10-20 15:34:49 +02:00
awieczarek
8ae60e33b3 Test 2024-10-20 15:32:53 +02:00
4 changed files with 24 additions and 4 deletions

View File

@ -1,11 +1,8 @@
FROM gitea/gitea:1.14.5-rootless
ADD conf/ /var/lib/gitea/custom/conf/
ADD config /etc/gitea
ADD data /var/lib/gitea
ADD localtime /etc/localtime
ADD timezone /etc/timezone
COPY parse_db_url.sh /usr/local/bin/parse_db_url.sh
ENTRYPOINT ["/usr/local/bin/parse_db_url.sh"]

7
conf/app.ini Normal file
View File

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

View File

@ -2,8 +2,20 @@ setup:
addons:
- plan: heroku-postgresql
as: DATABASE
config:
POSTGRES_USER: gitea
POSTGRES_PASSWORD: gitea
POSTGRES_DB: gitea
build:
docker:
web: Dockerfile
config:
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: db:5432
GITEA__database__NAME: gitea
GITEA__database__USER: gitea
GITEA__database__PASSWD: gitea
run:
web: /usr/local/bin/gitea web -port $PORT

View File

@ -6,3 +6,7 @@ export GITEA__database__PASSWD=$(echo ${DATABASE_URL} | sed -r "s|.*://[^:]+:([^
export GITEA__database__HOST=$(echo ${DATABASE_URL} | sed -r "s|.*@([^:]+):.*|\1|")
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