seagreen / ian

Personal megarepo
7 stars 0 forks source link

Heroku+Docker+Haskell not starting up #12

Closed seagreen closed 4 years ago

seagreen commented 4 years ago

Making this issue for my records.

(Also see this twitter thread: https://twitter.com/seagreen__/status/1289648325373751296)

The problem

Described in this commit: https://github.com/seagreen/ian/commit/1ae3e1918a717bae30ade73af1eae258ed6e8507

The example project to deploy a Haskell app to Heroku using Docker wouldn't start up.

Instead I'd get an H20 application boot timeout error:

2020-08-01T19:20:00.504119+00:00 heroku[web.1]: State changed from down to starting
2020-08-01T19:21:29.510832+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=still-caverns-93130.herokuapp.com request_id=ce95bda9-1424-4cd9-acfb-c279add392df fwd="69.151.217.99" dyno= connect= service= status=503 bytes= protocol=https
2020-08-01T19:22:02.935712+00:00 heroku[web.1]: State changed from starting to down
2020-08-01T19:22:17.414297+00:00 heroku[web.1]: Starting process with command `/bin/sh -c /opt/app/heroku-docker-haskell`
2020-08-01T19:22:23.438503+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2020-08-01T19:22:23.512124+00:00 heroku[web.1]: Process exited with status 143

The solution

This commit: https://github.com/seagreen/ian/commit/ccc878e20473d8012553bbf23411b6442b2e2325

Switch the final multi-stage docker image from the Stackage lts one to an official Heroku one.

seagreen commented 4 years ago

Not sure why the ubuntu docker image doesn't work, but regardless it's resolved.