Browse Source

Merge pull request #316 from chakki-works/heroku_docker

Enhancement/Enable Heroku deploy from Dockerfile
pull/334/head
Hiroki Nakayama 5 years ago
committed by GitHub
parent
commit
2b4c54af58
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 22 deletions
  1. 2
      .gitignore
  2. 1
      Procfile
  3. 11
      app.json
  4. 1
      heroku.yml
  5. 12
      tools/heroku.sh

2
.gitignore

@ -198,3 +198,5 @@ pip-selfcheck.json
node_modules/
bundle/
webpack-stats.json
.vscode/

1
Procfile

@ -1 +0,0 @@
web: gunicorn --pythonpath app app.wsgi

11
app.json

@ -36,20 +36,13 @@
"value": "True"
}
},
"stack": "container",
"scripts": {
"postdeploy": "sh tools/heroku.sh deploy"
"postdeploy": "sh tools/heroku.sh"
},
"addons": [
{
"plan": "heroku-postgresql:hobby-dev"
}
],
"buildpacks": [
{
"url": "heroku/nodejs"
},
{
"url": "heroku/python"
}
]
}

1
heroku.yml

@ -1,6 +1,5 @@
build:
docker:
web: Dockerfile
run:
web: /doccano/tools/run.sh

12
tools/heroku.sh

@ -2,16 +2,6 @@
set -o errexit
if [ "$1" = "build" ]; then
cd app/server/static
npm install --only=prod
npm install --only=dev
./node_modules/.bin/webpack --config ./webpack.config.js --mode production
echo "Done webpack build."
ls ./bundle
else
python app/manage.py migrate
python app/manage.py collectstatic --noinput
if [ -n "$ADMIN_USER_NAME" ]; then
python app/manage.py create_admin --noinput --username="$ADMIN_USER_NAME" --email="$ADMIN_CONTACT_EMAIL" --password="$ADMIN_PASSWORD"
fi
Loading…
Cancel
Save