not tested config
This commit is contained in:
parent
4948aae4cc
commit
6c75249ca4
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/venv
|
||||||
|
.idea
|
||||||
|
/postgres
|
@ -0,0 +1,7 @@
|
|||||||
|
FROM gitea/gitea:1.14.5-rootless
|
||||||
|
|
||||||
|
RUN mkdir -p /data/gitea
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["/usr/bin/gitea", "web"]
|
0
config/app.ini
Normal file
0
config/app.ini
Normal file
@ -10,3 +10,6 @@ setup:
|
|||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
web: Dockerfile
|
web: Dockerfile
|
||||||
|
|
||||||
|
run:
|
||||||
|
web: ./start.sh
|
23
run.sh
Normal file
23
run.sh
Normal file
@ -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 <<EOL
|
||||||
|
[database]
|
||||||
|
DB_TYPE = postgres
|
||||||
|
HOST = ${DB_HOST}
|
||||||
|
NAME = ${DB_NAME}
|
||||||
|
USER = ${DB_USER}
|
||||||
|
PASSWD = ${DB_PASSWORD}
|
||||||
|
SSL_MODE = require
|
||||||
|
|
||||||
|
[server]
|
||||||
|
DOMAIN = ${HEROKU_APP_DEFAULT_DOMAIN_NAME}
|
||||||
|
HTTP_PORT = ${PORT}
|
||||||
|
|
||||||
|
EOL
|
||||||
|
|
||||||
|
/usr/bin/gitea web
|
Loading…
Reference in New Issue
Block a user