It seems to work all right (fly deploy), but accessing the production app has an error! I think it’s related to the mix webapp task that tries to compile the React application and put it in the static folder.
My naive guess on how to do it is just to add “RUN mix webapp” in the Dockerfile. Is that correct??
mix webapp fails silently if there are any errors (which prevents it from making the dist folder & the index.html…). In the future, we can see how to make it display error messages!!!
Here is the real kicker – In the Docker env, we don’t have frontend folder . The solution is just
How to make it work
First, copy the frontend folder to the Docker environment!
Next, be sure to run “mix webapp”. In mix.exs, add it to the “assets.deploy” pipeline: