Browse Source

Merge pull request #1164 from doccano/fix/herokuDeploy

Fix heroku deploy
pull/1172/head
Hiroki Nakayama 3 years ago
committed by Paul
parent
commit
0793f41267
3 changed files with 4 additions and 2 deletions
  1. 2
      Dockerfile
  2. 2
      app.json
  3. 2
      tools/heroku.sh

2
Dockerfile

@ -29,6 +29,8 @@ COPY Pipfile* /tmp/
# hadolint ignore=DL3013 # hadolint ignore=DL3013
RUN pip install --no-cache-dir -U pip pipenv==2020.11.15 \ RUN pip install --no-cache-dir -U pip pipenv==2020.11.15 \
&& pipenv lock -r > /requirements.txt \ && pipenv lock -r > /requirements.txt \
&& echo "psycopg2-binary==2.8.6" >> /requirements.txt \
&& echo "django-heroku==0.3.1" >> /requirements.txt \
&& pip install --no-cache-dir -r /requirements.txt \ && pip install --no-cache-dir -r /requirements.txt \
&& pip wheel --no-cache-dir -r /requirements.txt -w /deps && pip wheel --no-cache-dir -r /requirements.txt -w /deps

2
app.json

@ -38,7 +38,7 @@
}, },
"stack": "container", "stack": "container",
"scripts": { "scripts": {
"postdeploy": "sh tools/heroku.sh"
"postdeploy": "sh /doccano/tools/heroku.sh"
}, },
"addons": [ "addons": [
{ {

2
tools/heroku.sh

@ -3,5 +3,5 @@
set -o errexit set -o errexit
if [ -n "$ADMIN_USER_NAME" ]; then if [ -n "$ADMIN_USER_NAME" ]; then
python app/manage.py create_admin --noinput --username="$ADMIN_USER_NAME" --email="$ADMIN_CONTACT_EMAIL" --password="$ADMIN_PASSWORD"
python /doccano/app/manage.py create_admin --noinput --username="$ADMIN_USER_NAME" --email="$ADMIN_CONTACT_EMAIL" --password="$ADMIN_PASSWORD"
fi fi
Loading…
Cancel
Save