umbrel icon indicating copy to clipboard operation
umbrel copied to clipboard

Update thunderhub and enable mempool explorer

Open aphex3k opened this issue 3 years ago • 25 comments
trafficstars

This PR will update thunderhub to the latest version and additionally enable the umbrel-hosted mempool block explorer as default explorer

aphex3k avatar Jan 30 '22 02:01 aphex3k

Currently investigating https://github.com/apotdevin/thunderhub/issues/393

aphex3k avatar Jan 30 '22 02:01 aphex3k

Currently investigating apotdevin/thunderhub#393

Currently all thunderhub docker images for versions v0.13.X are misbehaving. I tested v0.13.1-0.13.5 so far.

aphex3k avatar Jan 30 '22 23:01 aphex3k

Thanks for looking into this @aphex3k ❤️

Keep us posted!

lukechilds avatar Jan 31 '22 10:01 lukechilds

@aphex3k is the PR in it's current state working for you?

I just get:

web_1  | Error: Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
web_1  |     at NextNodeServer.getBuildId (/app/node_modules/next/dist/server/next-server.js:56:23)
web_1  |     at new Server (/app/node_modules/next/dist/server/base-server.js:101:29)
web_1  |     at new NextNodeServer (/app/node_modules/next/dist/server/next-server.js:146:9)
web_1  |     at NextServer.createServer (/app/node_modules/next/dist/server/next.js:111:16)
web_1  |     at async /app/node_modules/next/dist/server/next.js:123:31

I'm on a fresh isntall, definitely no entrypoint issue.

lukechilds avatar Feb 02 '22 12:02 lukechilds

@aphex3k is the PR in it's current state working for you?

I just get:

web_1  | Error: Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
web_1  |     at NextNodeServer.getBuildId (/app/node_modules/next/dist/server/next-server.js:56:23)
web_1  |     at new Server (/app/node_modules/next/dist/server/base-server.js:101:29)
web_1  |     at new NextNodeServer (/app/node_modules/next/dist/server/next-server.js:146:9)
web_1  |     at NextServer.createServer (/app/node_modules/next/dist/server/next.js:111:16)
web_1  |     at async /app/node_modules/next/dist/server/next.js:123:31

I'm on a fresh isntall, definitely no entrypoint issue.

Let me update the PR to v0.13.6 and test again.

aphex3k avatar Feb 02 '22 15:02 aphex3k

@lukechilds I updated the PR for v0.13.6 and can confirm, that this configuration is running on my node successfully.

e56a8e4f3d24   apotdevin/thunderhub:v0.13.6                    "/data/entrypoint.sh"     4 minutes ago   Up 4 minutes                    0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                                                                        thunderhub_web_1

I'm running umbrelOS on x86_64 and I don't have a raspberry pi to validate, sorry.

diff --git a/apps/thunderhub/data/entrypoint.sh b/apps/thunderhub/data/entrypoint.sh
index d87e474..575a9cc 100755
--- a/apps/thunderhub/data/entrypoint.sh
+++ b/apps/thunderhub/data/entrypoint.sh
@@ -3,4 +3,5 @@
 # Set password
 sed -i 's/$APP_PASSWORD/'${APP_PASSWORD}'/' /data/thubConfig.yaml

-exec npm start
+#exec npm start
+exec npm run start:prod
diff --git a/apps/thunderhub/docker-compose.yml b/apps/thunderhub/docker-compose.yml
index 5baff0a..8019330 100644
--- a/apps/thunderhub/docker-compose.yml
+++ b/apps/thunderhub/docker-compose.yml
@@ -2,8 +2,7 @@ version: "3.7"

 services:
   web:
-    image: apotdevin/thunderhub:v0.12.31@sha256:f86341cb1987a3907f7227ccd4c00dead68d372e464b111414b8427228062276
-    user: "1000:1000"
+    image: apotdevin/thunderhub:v0.13.6@sha256:b439b00f23376f932acd9c13e5037dd5870740dd66e3ebb7065a9d62a4fc370d
     restart: on-failure
     stop_grace_period: 1m
     ports:
@@ -19,6 +18,7 @@ services:
       ACCOUNT_CONFIG_PATH: "/data/thubConfig.yaml"
       YML_ENV_1: "$LND_IP:$LND_GRPC_PORT"
       TOR_PROXY_SERVER: "socks://$TOR_PROXY_IP:$TOR_PROXY_PORT"
+      MEMPOOL_URL: "http://${DEVICE_HOSTNAME}:$APP_MEMPOOL_PORT"
     networks:
       default:
         ipv4_address: $APP_THUNDERHUB_IP

image

aphex3k avatar Feb 02 '22 16:02 aphex3k

Ah yes can recreate the issue. Working fine for me on amd64 but on arm64 just get Error: Could not find a production build in the '/app/.next' directory.. I can recreate the issues by just running docker run apotdevin/thunderhub:v0.13.6 on arm, outside of Umbrel, I get the same error.

Seems like a broken arm64 Docker image. Any idea @apotdevin? Have you recently changed the way the arm images are built?

lukechilds avatar Feb 06 '22 10:02 lukechilds

Hey! There was a big refactor for version 0.13.0 and might have messed up the arm64 image. I'll give it a check!

apotdevin avatar Feb 07 '22 21:02 apotdevin

@apotdevin Thanks!

lukechilds avatar Feb 08 '22 09:02 lukechilds

Checked and still not sure why the arm64 image breaks.. Need to get more time to figure out whats wrong. Is this a blocker to update?

apotdevin avatar Feb 16 '22 18:02 apotdevin

Checked and still not sure why the arm64 image breaks.. Need to get more time to figure out whats wrong. Is this a blocker to update?

Yes I would presume this is a blocker. I just ordered a Raspberry Pi on Monday so I can do some additional investigating after it has been delivered.

aphex3k avatar Feb 16 '22 19:02 aphex3k

It's definitely something from ThunderHub. NextJS (the frontend framework that is used) doesn't seem to find the production built files even though they are there. And it only happens on arm64

apotdevin avatar Feb 16 '22 19:02 apotdevin

Checked and still not sure why the arm64 image breaks.. Need to get more time to figure out whats wrong. Is this a blocker to update?

Yeah unfortunately, a large majority of users run Umbrel on Pi, so arm64. Do you need help investigating the issue? @aphex3k have you been able to try your fix on Pi? If not, I can do so, just tell me.

louneskmt avatar Feb 17 '22 10:02 louneskmt

@aphex3k have you been able to try your fix on Pi? If not, I can do so, just tell me.

I plan on looking at it further over the weekend. The estimated delivery for the Raspberry is tomorrow (Fri).

aphex3k avatar Feb 17 '22 17:02 aphex3k

Any update on this? I'm currently reviewing all app updates.

louneskmt avatar Mar 30 '22 14:03 louneskmt

@aphex3k @apotdevin did you guys manage to get to the bottom of this?

lukechilds avatar Apr 03 '22 10:04 lukechilds

Hey, I had a look again but unfortunately I can't figure out why the arm64 image has this issue. I have opened an issue in the NextJS library to see if I can get some help figuring this out.

https://github.com/vercel/next.js/issues/35868

apotdevin avatar Apr 04 '22 09:04 apotdevin

Ok, I might have found a workaround for this issue. Changed the base image for the arm64 build to not be alpine and it seems to have worked.

Currently building the images for version 0.13.10 that has this change.

apotdevin avatar Apr 04 '22 16:04 apotdevin

Ok, images are up! @aphex3k @louneskmt if you guys can test it out with version 0.13.10 would be awesome

apotdevin avatar Apr 04 '22 21:04 apotdevin

Ok, I might have found a workaround for this issue. Changed the base image for the arm64 build to not be alpine and it seems to have worked.

I guess the issue was a (new?) build dependency not included in the alpine image?

Will test this PR today.

louneskmt avatar Apr 05 '22 08:04 louneskmt

Ok, I might have found a workaround for this issue. Changed the base image for the arm64 build to not be alpine and it seems to have worked.

I guess the issue was a (new?) build dependency not included in the alpine image?

Will test this PR today.

Probably, but debugging was hard since it doesn't show any error just that the folder doesn't exist. It's also specific to arm64 since the alpine images still work for amd64 and arm32.

Let me know if it works!

apotdevin avatar Apr 05 '22 18:04 apotdevin

The multiarch image should be merged now!

@louneskmt I had to remove the permission stuff from the docker image since it was causing issues with other deployments.

apotdevin avatar May 09 '22 10:05 apotdevin

Yeah that's fine, we might drop the non-root user requirement soon.

Will get this merged for the next release 💪

louneskmt avatar May 09 '22 11:05 louneskmt

@louneskmt Unfortunately this was not merged before the last release. Any progress on this?

kroese avatar Jun 06 '22 22:06 kroese

I've been running my own branch of umbrel for quite some time now as I'm not 100% aligned with the goals and decisions of the project anymore. This PR is up for grabs but if nobody wants to take it it might be worth closing...

aphex3k avatar Jun 06 '22 23:06 aphex3k

I'm closing this PR as it became irrelevant.

aphex3k avatar Aug 22 '22 18:08 aphex3k