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 <