Moving more config to the app
This commit is contained in:
parent
a9747d79c9
commit
bd18997cc0
24
app.json
24
app.json
@ -2,9 +2,33 @@
|
||||
"name": "gitea",
|
||||
"description": "Gitea is a painless self-hosted Git service.",
|
||||
"repository": "https://gitlab.com/autonomic-cooperative/gitea-dokku",
|
||||
"dokku": {
|
||||
"plugins": [
|
||||
{ "name": "proxy", "commands": ["proxy:ports-add http:80:3000"] },
|
||||
{
|
||||
"name": "letsencrypt",
|
||||
"commands": ["letsencrypt gitea", "letsencrypt:cron-job --add"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "bash /app/predeploy.sh",
|
||||
"postdeploy": "bash /app/postdeploy.sh"
|
||||
}
|
||||
},
|
||||
"volumes": [
|
||||
{
|
||||
"host": "/var/lib/gitea",
|
||||
"app": "/data"
|
||||
},
|
||||
{
|
||||
"host": "/etc/timezone",
|
||||
"app": "/etc/timezone:ro"
|
||||
},
|
||||
{
|
||||
"host": "/etc/localtime",
|
||||
"app": "/etc/localtime:ro"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
20
predeploy.sh
Executable file
20
predeploy.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
setup_db() {
|
||||
set -eu
|
||||
|
||||
echo "=====> Running database migration"
|
||||
gitea migrate
|
||||
}
|
||||
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
if [ -f "/data/gitea/conf/app.ini" ]; then
|
||||
setup_db
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
Reference in New Issue
Block a user