diff --git a/Dockerfile b/Dockerfile index bf14c398..0e7aa7c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,8 @@ COPY Pipfile* /tmp/ # hadolint ignore=DL3013 RUN pip install --no-cache-dir -U pip pipenv==2020.11.15 \ && 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 wheel --no-cache-dir -r /requirements.txt -w /deps diff --git a/app.json b/app.json index a5bddf0b..71a7e76f 100644 --- a/app.json +++ b/app.json @@ -38,7 +38,7 @@ }, "stack": "container", "scripts": { - "postdeploy": "sh tools/heroku.sh" + "postdeploy": "sh /doccano/tools/heroku.sh" }, "addons": [ { diff --git a/tools/heroku.sh b/tools/heroku.sh index 5d335f86..14b011cc 100644 --- a/tools/heroku.sh +++ b/tools/heroku.sh @@ -3,5 +3,5 @@ set -o errexit 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