getumbrel / umbrel-community-app-store

Template repository for a creating your own Community App Store for Umbrel. Click "Use this template" and add your apps!
63 stars 74 forks source link

App won't start up #2

Closed PlebeiusGaragicus closed 2 years ago

PlebeiusGaragicus commented 2 years ago

I made my own hello world app and once it's installed it won't get past the "starting" phase. I checked the logs and see this:

FhQx31oaYAEXLNc

I don't understand Docker fully, but I'm thinking it's related to the APP_HOST variable in docker-compose.yml... but I followed the format of the comment in the example app and I've tried 0.0.0.0 and 127.0.0.1... I can't find any documentation to help me through this. Does my app need to do anything in order to initialize?

PlebeiusGaragicus commented 2 years ago

Is this the code that's running here?

https://github.com/getumbrel/umbrel/blob/master/deps/app-proxy/bin/www

I'm sure the problem is with my app and Umbrel is trying to listen on the port and not hearing anything..

What is my app supposed to do here to make Umbrel happy?

PlebeiusGaragicus commented 2 years ago

I kept digging and discovered that the container logs I was reading was actually the app proxy container that Umbrel sets up for me - it is waiting for the container I made to startup. So I read the logs of my app's container and it gave this:

[FATAL tini (7)] exec python failed: Exec format error
PlebeiusGaragicus commented 2 years ago

Further digging: I'm running Umbrel via a Parallels VM on my M1 macbook and think I discovered the cause of the Exec format error:

sudo docker run plebeiusgaragicus/plebtools-hello-world:latest /bin/sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/sh: exec format error

I'm sure my Dockerfile/build process is to blame - but I'm now confused about Docker not being able to run cross platform like this - I thought that was the benefit of Docker. Not sure how to modify to enable my Docker image to run on whatever platform Umbrel OS happens to be running on..

PlebeiusGaragicus commented 2 years ago

This has been fixed - my app now runs!

I re-read the how-to example of deploying your own app: https://github.com/getumbrel/umbrel-apps#a-good-dockerfile

Then, I re-worked my Github Action accordingly following this: https://github.com/docker/build-push-action

and making sure to add the line:

platforms: linux/amd64,linux/arm64