thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
501 stars 30 forks source link

Use Docker #286

Closed jferris closed 8 years ago

jferris commented 8 years ago
pbrisbin commented 8 years ago

WDYT about holding off on trying to use the Dockerfile for development, postgres via docker-compose etc, and (for now) just shipping what's needed for heroku docker:release to work?

I think the various problems you're having are related to the former, but the latter is the more valuable increment, IMO. Getting just that much in would make #285 shippable, and Halcyon completely removable.

pbrisbin commented 8 years ago

FYI: I'm in the process of shipping https://hub.docker.com/r/pbrisbin/heroku-haskell-stack/builds/ which let me reduce a Heroku Docker-based project's own Dockerfile to https://github.com/pbrisbin/alac/blob/master/Dockerfile. I'm going to start using it in other projects, with Carnival being the most complex it may be a few iterations before it can be used here (if we want to).

jferris commented 8 years ago

WDYT about holding off on trying to use the Dockerfile for development, postgres via docker-compose etc, and (for now) just shipping what's needed for heroku docker:release to work?

Yeah, that's probably a good idea. I think I can simplify a few things by doing that.

For what it's worth, I have the issue with stack exec yesod devel with or without Docker. I'm not sure how it's working for you, as the stack.yml directly specifies an incompatible version of yesod-bin. Maybe it will use a newer yesod-bin if you somehow have it installed from another project?

pbrisbin commented 8 years ago

I'll try to dig into the stack-yesod-devel thing and verify that it's really working and why.

jferris commented 8 years ago

I simplified this to just replace deployment instead of development. I also added some missing stuff for deploying (--app carnival-staging, app.json, and Procfile). This is ready for re-review.

pbrisbin commented 8 years ago

This looks ready to try to me.

jferris commented 8 years ago

The staging deploy was successful.

One weird thing is that we're now building for production using Docker/Stack, and building locally/on CI using Halcyon and either cabal-install or Stack (I can't even tell!).

I think it makes sense to switch everything over to Stack at the same time as production, so that we have better production/development/test parity. We can try and switch dev/test over to Docker later if we think that's beneficial.

Objections?

pbrisbin commented 8 years ago

It sounds like you're advocating merging this, #285, and the removal of anything halcyon basically at once. If so :+1:

jferris commented 8 years ago

This is ready for review again. I've now replaced Halcyon with Stack entirely and updated the documentation accordingly. I borrowed a bunch of code from #285, so this does just about everything except updating GHC, which I thought made sense to handle separately.

pbrisbin commented 8 years ago

Well done. LGTM.