Phoenix app with relative path internal dep not resolved accurately

I cannot deploy b/c docker is unable to find my internal dependencies by the local relative path.
I have the following structure:


and app_root/mix.exs has in deps {:app2, path: "./app2"} and app2/mix.exs has in deps {:app3, path: "../app3"}. I don’t know whether the app3 dependency would be resolved b/c it fails to find app2 complaining that app2 isn't available, please ensure the dependency is at "/app2". How do I resolve this?

I’ve tried changing the app to an umbrella project but this is not helpful. I cannot find any information about how to resolve this issue of Docker messing up relative paths. If it builds locally why is Docker not able to resolve the paths correctly?

Can you post your Dockerfile and the errors?


Is this you? –

EDIT: As I’m reading through the thread… it is you! :slight_smile:

I’ve given up on making that work. I tried dozens of permutations of Dockerfile commands and mix compilation steps. I ultimately eliminated the need for the assets file by just making a separate module that only exists to provide the 8k item list of strings without needing to read from a separate txt file. I’m still not able to deploy however the errors are completely useless.

 2022-01-19T17:49:24.974 runner[d52263dc] sea [info] Configuring virtual machine

2022-01-19T17:49:24.976 runner[d52263dc] sea [info] Pulling container image

2022-01-19T17:49:26.680 runner[d52263dc] sea [info] Unpacking image

2022-01-19T17:49:27.231 runner[d52263dc] sea [info] Preparing kernel init

2022-01-19T17:49:27.697 runner[d52263dc] sea [info] Configuring firecracker

2022-01-19T17:49:27.828 runner[d52263dc] sea [info] Starting virtual machine

2022-01-19T17:49:27.963 app[d52263dc] sea [info] Starting init (commit: 0c50bff)...

2022-01-19T17:49:28.008 app[d52263dc] sea [info] 2022/01/19 17:49:27 listening on [fdaa:0:3c5b:a7b:2d30:d522:63dc:2]:22 (DNS: [fdaa::3]:53)

2022-01-19T17:49:29.818 app[d52263dc] sea [info] 17:49:29.817 [info] Running B2Web.Endpoint with cowboy 2.9.0 at :::4000 (http)

2022-01-19T17:49:29.820 app[d52263dc] sea [info] 17:49:29.820 [info] Access B2Web.Endpoint at

2022-01-19T17:49:29.993 app[d52263dc] sea [info] Reaped child process with pid: 567 and signal: SIGUSR1, core dumped? false

2022-01-19T17:49:50.458 proxy[d52263dc] sea [error] Health check status changed 'passing' => 'critical' 

It looks like your app is listening on port 4000 but your fly.toml file is configured for port 8080. Update internal_port to 4000 and try again.

You’re right, we need to detect this type of configuration issue and show better errors. Until then we’ve been printing a link to the troubleshooting doc, but it’s easy to miss.

1 Like

update the fly.toml or the app config?

The fly.toml file tells our system which port your app is listening on. Once you get the port right we’ll be able to connect to the app and perform the health checks. Post your fly.toml file if you’re not sure what to change and I can help you with it.

1 Like

Thanks. I updated the internal_port setting in fly.toml and finally got something approaching a working app. Now there’s a check_origin error I have to correct to keep it from constantly reloading. Do I set that in prod.exs or runtime.exs?
Putting it in runtime.exs worked.