我正处于部署django网站的最后一步。它使用docker运行它,我最终通过heroku部署它。我在运行"git push heroku master“时遇到了一个错误。我收到“您的应用程序不包括heroku.yml构建清单。要部署应用程序,要么创建一个heroku.yml:https://devcenter.heroku.com/articles/build-docker-images-heroku-yml"。这很奇怪,因为我实际上有一个heroku.yml应用程序。”
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,因为这是我的网站所在的目录。两样都没用。
发布于 2022-05-27 09:47:07
当我把错误的树枝推给heroku时,我就遇到了这种情况。我在开发部门进行测试,但是没有heroku.yml的主。
透水gitlab-ci
stages:
- staging
staging:
stage: staging
image: ruby:latest
script:
- git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/$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:$HEROKU_API_KEY@git.heroku.com/$PROJECT.git
- git push -f heroku develop:master
only:
- develophttps://stackoverflow.com/questions/63223246
复制相似问题