horrible elixir experience

why is it that you cannot provide working tutorials for deploying elixir apps, every tut is written never works. it is impossible to use a docker image ive tried 6 different tuts and they all end the same with the same error, you need to step up your game and actually test your products first, your example app on github will not deploy, ive spent prolly 15 hrs trying to get this to work, i have approx 300 apps deployed on heroku written in elixir using docker containers, im a linux solo user and am thinking about azure as it appears that is the ONLY option that has actually been tested as working by ms, vs expecting the community to do diligance and actually have a working example. i hate ms business model but if it gets me off the ground and makes me money i will have 0 reason to support small business, all you cost me is technical debit currently. this exact build pushed successfully 3 months ago, and is running on your services, simply cloning the repo and trying to push no longer works due to docker errors.

github repo im trying to deploy: GitHub - mithereal/phoenix_liveview_skeleton

You could probably start by posting the actual errors that you’ve experienced?


Aug 9 07:42:17 PM Dockerfile:21
Aug 9 07:42:17 PM --------------------
Aug 9 07:42:17 PM 19 | # install mix dependencies
Aug 9 07:42:17 PM 20 | COPY mix.exs mix.lock ./
Aug 9 07:42:17 PM 21 | >>> RUN mix deps.get --only $MIX_ENV
Aug 9 07:42:17 PM 22 |
Aug 9 07:42:17 PM 23 | # copy compile configuration files
Aug 9 07:42:17 PM --------------------
Aug 9 07:42:17 PM error: failed to solve: process “/bin/sh -c mix deps.get --only $MIX_ENV” did not complete successfully: exit code: 1

same error on your github demo repo, there is a pr with a updated docker but again it fails with the same error.

when i try the hello_elixir app and do a fly launch i get the following error, btw i just did an update to flyctl package
Created app spring-thunder-9319 in organization personal
Set secrets on spring-thunder-9319: SECRET_KEY_BASE
Preparing system for Elixir builds
Installing application dependencies
Running Docker release generator
Error failed running /usr/bin/mix phx.gen.release --docker: exit status 1

I’m no Elixir expert but it looks like your mix.exs file is requiring vsn.exs to be present but you haven’t copied it over to the build image yet at that step in your Dockerfile when you run mix deps.get

oh damn, that thing again, im not a docker expert ive edited the docker files a lot and done force pushing cuz i wahnted a cleaner repo, got bitten by that, its wierd that it works on heroku tho, so i mustve deleted that step.

but why would it do this on the hello_elixir app there is no vsn.exs

Your mix.exs seems to reference vsn.exs while their example repo does not

right i saw that so i just pulled down the hello app and tried pushing that, not the app i referred to in the first post, i get the error The task “phx.gen.release” could not be found. Did you mean “phx.gen.presence”?, however in other apps i can run this command, but it doesnt work for umbrella apps

Hmm I’m probably a bit out of my depth to be debugging the whole issue here, but what I can say is that your app is failing at the Docker build step, while when I clone the hello_elixir repo I can successfully build a docker image for it with docker build .

As a first step I would work on making sure you can get your image to build correctly with docker build . or flyctl deploy --build-only. I think you need to make some changes to the Dockerfile to get there. Then tackle any deployment issues next

2 Likes

thx i will look into that, i can also successfully build with docker build . its just when i do a fly launch it fails, it acts like the “phx.gen.release” doesnt exist, but most of my other repos have it does mix phx.gen.release work for you? im wondering if maybe its a versioning issue or something

also
~/P/hello_elixir> flyctl deploy --build-only 4499ms  Tue 09 Aug 2022 10:13:13 PM MST
==> Verifying app config
→ Verified app config
==> Building image
Error failed to fetch an image or build from source: error connecting to docker: Could not find App