4 ms·
Heroku requires a Heroku.yml, no? Seems pretty comparable to me.
by nicoburns 5y ago
Heroku requires a Heroku.yml, no? Seems pretty comparable to me.
- xena 5y agoIt used to not to. Before the heroku.yml file it did most of the things with either auto detection of build packs and implicit procfile generation. You could git push a vanilla rails app and it would just work. It was magical before then.
- jrochkind1 5y agoStill is. I don't use a `heroku.yml`. That appears to be an alternate available path, I don't know how many heroku customers use it.
- Fradow 5y agoIt doesn't, no. I don't even know what that is (well a quick look at the documentation: it's about Docker, which is not needed for Heroku). All it requires is a Procfile, which can contain a single line telling how to start your server and that you can extend to add other process types. It's not even needed for simple apps.
- yunwal 5y agoGenuine question, is a Procfile really that preferable to a Dockerfile with equivalent functionality? > cmd: python helloworld.py doesn't seem massively less complicated than FROM alpine CMD ["python", "helloworld.py"] FWIW, I've never used heroku in production so maybe it's more about the constraints of heroku than the number of words, but it just doesn't seem like a huge deal to me.
- ek750 5y agoI'm familiar with docker but certainly not an expert, so this is surprising to me. Is it really possible to have a single line dockerfile? The smallest one I've used was probably a screen full, due to updating packages, setting up bundler paths, etc. A production dockerfile is much larger with non-root user shenanigans, etc. But to answer your question about Heroku, a Procfile is much smaller and more constrained in scope than a Dockerfile.
- girvo 5y ago> I'm familiar with docker but certainly not an expert, so this is surprising to me. Is it really possible to have a single line dockerfile? Not single line, but two lines, sure. Though you're at the mercy of your upstream image and how it configures things. Though I guess that's also true of buildpacks. Plenty of my Dockerfiles are no more than a couple lines. Heroku was still nicer in most ways of course, at least in my opinion.
- Fradow 5y agoSince I've never used Docker, I can't answer. A Procfile works well with what you'd want to do on Heroku: run a webserver, and maybe run some other worker process. It's a single line per process, equivalent to what you run locally.