mmport80
Clean / Reproducible Builds
This week I upgraded from Phoenix 1.3 to 1.4.
Everything was compiling well on my machine afterwards.
This is the script I use to run a dev server
mix local.rebar --force;
mix local.hex --force;
mix clean;
mix deps.get --all;
mix compile;
iex --name api@127.0.0.1 -S mix phx.server;
I have a similar script which runs tests locally.
But after doing mix deps.clean --all and trying to recompile, I had a problem.
I have a custom Ecto type dependency → GitHub - OvermindDL1/ecto_interval: Interval type for Ecto, currently only implemented for PostgreSQL, other database PR's are welcome. · GitHub Which seems to have dependency problems. I have to figure that out.
(Turns out, just needed to update it to the latest version)
But my question is, what do you do to ensure your builds are reproducible and you catch problems like this?
I am sure I am committing a common mistake, perhaps it would be a good idea to somehow simplify the required mix commands…
Most Liked
easco
In my experience with Docker, it is convenient to add the “deps” and “_build” folders to the .dockerignore file so that they are not mapped into the environment in which the image is built (forcing a recompile while the image is being constructed).
stefanchrobot
For Continuous Integration (test, formatter, Credo) and deployment we’re using Dockerized versions of our apps. Looks pretty much the same as your script: we set MIX_ENV and there’s no need for mix clean. For local development, we use the regular flow.
stefanchrobot
Can you check to what versions did you deps resolve? Maybe they were not properly pinned?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









