How could I cache this? Aptible works by pushing to a remote git branch, and a Dockerfile performs installs, compiles, yada yada, then finally mix phx.server.
Normally this is a feature of the build platform. Honestly I find aptible’s policy here confusing. It makes sense for an already built artifact to respond within x seconds after an attempted deployment, but they’re including building + deploying as one step which is quite odd.
See if there is a way to build as a separate step from deploying maybe?
I have 98 in my mix.lock file and a full rebuild takes 2 min, 25 seconds, including a rust dependency that takes quite a while to build. 17 minutes is still crazy long to me.
Well the output of the compiler itself would be a good start, especially if it’s timestamped (or, say, streamed to something saving and timestamping it as such)?
Turns out you can build to your hearts content (timewise) in the Dockerfile.
Support asked me to pass the --no-compile flag to mix phx.server so we’ll see how that turns out and I’ll write a guide for deploying Phoenix apps to Aptible.
The final CMD in my Dockerfile is the one that has a time limit on it, and by passing no-compile the time should be shortened.