From 6c75249ca46446c92ae7bbf9ae3a23a5b58f1d42 Mon Sep 17 00:00:00 2001 From: asmigiel Date: Sun, 22 Dec 2024 22:15:01 +0100 Subject: [PATCH] not tested config --- .gitignore | 3 +++ Dockerfile | 7 +++++++ config/app.ini | 0 heroku.yml | 3 +++ run.sh | 23 +++++++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 .gitignore create mode 100644 config/app.ini create mode 100644 run.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d0adb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/venv +.idea +/postgres \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e69de29..1dff7ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM gitea/gitea:1.14.5-rootless + +RUN mkdir -p /data/gitea + +EXPOSE 3000 + +CMD ["/usr/bin/gitea", "web"] diff --git a/config/app.ini b/config/app.ini new file mode 100644 index 0000000..e69de29 diff --git a/heroku.yml b/heroku.yml index 534b556..12f3d8c 100644 --- a/heroku.yml +++ b/heroku.yml @@ -10,3 +10,6 @@ setup: build: docker: web: Dockerfile + +run: + web: ./start.sh \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..a62d657 --- /dev/null +++ b/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +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/') +export DB_NAME=$(heroku config:get DATABASE_URL | sed 's/.*\/\(.*\)/\1/') + +cat > /data/gitea/conf/app.ini <