Skip to content

Commit 2b4c54a

Browse files
authored
Merge pull request doccano#316 from chakki-works/heroku_docker
Enhancement/Enable Heroku deploy from Dockerfile
2 parents ef01fc5 + 74c81c2 commit 2b4c54a

File tree

5 files changed

+5
-22
lines changed

5 files changed

+5
-22
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,5 @@ pip-selfcheck.json
198198
node_modules/
199199
bundle/
200200
webpack-stats.json
201+
202+
.vscode/

Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

app.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,13 @@
3636
"value": "True"
3737
}
3838
},
39+
"stack": "container",
3940
"scripts": {
40-
"postdeploy": "sh tools/heroku.sh deploy"
41+
"postdeploy": "sh tools/heroku.sh"
4142
},
4243
"addons": [
4344
{
4445
"plan": "heroku-postgresql:hobby-dev"
4546
}
46-
],
47-
"buildpacks": [
48-
{
49-
"url": "heroku/nodejs"
50-
},
51-
{
52-
"url": "heroku/python"
53-
}
5447
]
5548
}

heroku.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
build:
22
docker:
33
web: Dockerfile
4-
54
run:
65
web: /doccano/tools/run.sh

tools/heroku.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22

33
set -o errexit
44

5-
if [ "$1" = "build" ]; then
6-
cd app/server/static
7-
npm install --only=prod
8-
npm install --only=dev
9-
./node_modules/.bin/webpack --config ./webpack.config.js --mode production
10-
echo "Done webpack build."
11-
ls ./bundle
12-
else
13-
python app/manage.py migrate
14-
python app/manage.py collectstatic --noinput
5+
if [ -n "$ADMIN_USER_NAME" ]; then
156
python app/manage.py create_admin --noinput --username="$ADMIN_USER_NAME" --email="$ADMIN_CONTACT_EMAIL" --password="$ADMIN_PASSWORD"
16-
177
fi

0 commit comments

Comments
 (0)