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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
5 additions and
22 deletions
-
.gitignore
-
Procfile
-
app.json
-
heroku.yml
-
tools/heroku.sh
|
|
@ -198,3 +198,5 @@ pip-selfcheck.json |
|
|
|
node_modules/ |
|
|
|
bundle/ |
|
|
|
webpack-stats.json |
|
|
|
|
|
|
|
.vscode/ |
|
|
@ -1 +0,0 @@ |
|
|
|
web: gunicorn --pythonpath app app.wsgi |
|
|
@ -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,6 +1,5 @@ |
|
|
|
build: |
|
|
|
docker: |
|
|
|
web: Dockerfile |
|
|
|
|
|
|
|
run: |
|
|
|
web: /doccano/tools/run.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 |