tjarbo / discord-moodle-bot

Get notified about changes on moodle on you favorite platform!
https://docs.tjarbo.me/moodle-notification-service/1.0.0/home
GNU Affero General Public License v3.0
25 stars 2 forks source link

Error with rasperry pi 4 #260

Open FreshImmuc opened 1 year ago

FreshImmuc commented 1 year ago

Hey,

i am trying to host v2 on a rasperry pi but always get the error:

$ docker compose up -d
[+] Running 0/2
 ⠦ mongo Pulling
 ⠧ notification-service Pulling
no matching manifest for linux/arm64/v8 in the manifest list entries

I already tried it by using the mongo image: arm64v8/mongo wich is intended for this type of machine but sadly the same error.

Any fixes / things i can try to fix this?

p-fruck commented 1 year ago

Hey there,

this is because currently we only provide x86 builds for the notification-service. As a quick workaround, I would suggest you build the image locally on your Pi. @tjarbo do you think we can provide arm builds too using docker buildx or some similar tooling?

FreshImmuc commented 1 year ago

Alright, how exactly can i build it locally? The project is already cloned, docker is installed

p-fruck commented 1 year ago

Do you also have nodejs installed locally? Inside the repository, you need to build the project using npm ci && npm run build. Then just execute docker build . -t tjarbo/notification-service:next. Afterwards, compose should be able to start the stack just fine

FreshImmuc commented 1 year ago

wich npm / node version do i have to use? I get many errors with node-gyp and make

p-fruck commented 1 year ago

The project currently uses an outdated version of nodejs. Which version are you running locally? The node-gyp errors are likely due to node-sass depending on Python2 which is not available on your system. To fix that, change the version of node-sass to ^8.0.0 in the packages/frontend/package.json

tjarbo commented 1 year ago

@tjarbo do you think we can provide arm builds too using docker buildx or some similar tooling?

@p-fruck, haven't we implemented that already somewhere in a different project 🤔? Like Jimmi or so? Would make the implementation much easier if we have something as a reference.

p-fruck commented 1 year ago

@tjarbo I thought so too but it seems like we only opened a feature request and closed the issue when the repo got archived :smile: https://github.com/p-fruck/jim/issues/35