bbhoss / k8sexamplephx

Example repo for using Phoenix/Elixir inside of a Kubernetes cluster with libcluster
20 stars 5 forks source link

fix: locale-gen error on docker-build #2

Open yeongsheng-tan opened 7 years ago

yeongsheng-tan commented 7 years ago
  1. Fix docker build error at local-gen run command,
  2. Upgrade to ubuntu 17.04,
  3. Upgrade to elixir 1.4, and
  4. hex packages update.
bbhoss commented 7 years ago

Thanks for making the improvements. Mostly everything looks good to me, this was just an example project anyways. The only thing I have a question about is the removal of the production secret import. Is that intended? If so, why?

Thanks

yeongsheng-tan commented 7 years ago

Sorry. The removal of prod.secret.exs was meant to make the docker build as self-contained as possible.

Since it is bad practice to check-in production secrets, and we have no good way to use services like Consul or such to inject prod.secret.exs, I'm not sure how to skin this given what we have now.

Would you have anything you would like to propose, and I can try to see if I can help to implement it. Otherwise, I could add back the line import_config "prod.secret.exs" to config/prod.exs. But since anyone checking out the project will not have this file, it'll likely break the build (bad user experience), until they realise, they have to add their own to the repo, but is defined as .gitignore.

yeongsheng-tan commented 7 years ago

I decided to take the simplest approach for now:

  1. Re-introduce prod.secret.exs into config/prod.exs
  2. Update README.md to remind user to manually do the needed step to add a bare minimum basic config/prod.secret.exs step so build can happen correctly
yeongsheng-tan commented 7 years ago

@bbhoss What's your opinion if I move away from Ubuntu/Debian OS for the container, and swing to using alpine-linux containers. Simply for the size, which would have the downstream impact of faster builds.

Let me know your thoughts.

bbhoss commented 7 years ago

Sorry for the delay. I am all good with it. I would also try to take advantage of the multi-step build additions that Docker has added, if possible. That way the only thing needed on the final image is the release (with ERTS included)