我正在将docker
容器部署到Heroku
并部署不正确的remote process types
。我不知道为什么会这样..。
我的Procfile
是:
web: python app.py
我的docker-compose.yml
文件是:
web:
build: .
command: python app.py
working_dir: /app
environment:
PORT: 8080
ports:
- '8080:5000'
shell:
build: .
command: bash
working_dir: /app
environment:
PORT: 8080
ports:
- '8080:5000'
volumes:
- '.:/app'
由于某些原因,当我使用heroku docker:release
进行部署时,我得到:
Remote addons: (0) Local addons: (0) Missing addons: (0) Creating local slug... Building web Step 1 : FROM t206cv:latest ---> af69b4ac9de8
Successfully built af69b4ac9de8
extracting slug from container...
creating remote slug...
language-pack: heroku-docker (t206cv:latest)
remote process types: { web: 'cd /app/user && python app.py' }
uploading slug [====================] 100% of 127 MB, 0.0s
releasing slug...
Successfully released still-depths-21391!
我怎样才能改变
remote process types: { web: 'cd /app/user && python app.py' }
至
remote process types: { web: 'cd /app && python app.py' }
发布于 2016-04-01 03:08:28
文档似乎表明,当您运行:heroku docker:init
时,docker-compose.yml
和Dockerfile
都是从app.json
文件生成的。
/app/user
路径可能在其中,并且可能是更改的最佳位置(然后只需再次运行heroku docker:init
)。
或者,这个路径可能在Dockerfile
中,只要在那里更改它(以及您的.yml文件)就可以解决您的问题。
编辑:
看起来,app/user
目录是用赫鲁库-码头本身在directory.js
中硬编码的。看起来很奇怪,但那可能是你唯一能改变的地方。
...and在docker.js中似乎也是硬编码的,它似乎是生成dockerCompose.yml文件的来源。
https://stackoverflow.com/questions/36347028
复制相似问题