通过heroku在docker上部署django网站时出错-“Your app does not include a heroku.yml build manifest”

bybem2ql  于 8个月前  发布在  Docker
关注(0)|答案(2)|浏览(58)

我正在部署一个django网站的最后几步。它使用docker来运行它,我最终通过heroku部署它。我在运行“git push heroku master”时遇到一个错误。我收到“Your app does not include a heroku.yml build manifest. To deploy your app,either create a heroku.yml:https://devcenter.heroku.com/articles/build-docker-images-heroku-yml" . This is odd as I do actually have a heroku.yml app.
heroku.yml

setup:
    addons:
    - plan: heroku-postgresql
build:
    docker:
        web: Dockerfile
release:
    image: web
    command:
        - python manage.py collectstatic --noinput
run:
    web: gunicorn books.wsgi

字符串
我下面的教程使用的是“gunicorn bookstore_project.wsgi”,但我使用的是books.wsgi,因为这是我网站所在的目录。

yqyhoc1h

yqyhoc1h1#

这发生在我身上,当我推错了分支到heroku。我是在开发分支测试,但推主没有heroku.yml
透水gitlab-ci

stages:
  - staging

staging:
  stage: staging
  image: ruby:latest
  script:
    - git remote add heroku https://heroku:[email protected]/$PROJECT.git
    - git push -f heroku master
  only:
    - develop

字符串
实际gitlab-ci

stages:
  - staging

staging:
  stage: staging
  image: ruby:latest
  script:
    - git remote add heroku https://heroku:[email protected]/$PROJECT.git
    - git push -f heroku develop:master
  only:
    - develop

zf9nrax1

zf9nrax12#

我从我的本地推,所以我必须运行以下命令:

git push heroku local-branch:main

字符串
local-branch添加到您当前的分支。

相关问题