gotify / server

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
https://gotify.net
Other
10.43k stars 593 forks source link

Consider release source with ui already build? #627

Closed chk-jxcn closed 5 months ago

chk-jxcn commented 5 months ago

Is your feature request related to a problem? Please describe. Diffcult to build server on a old machine

Describe the solution you'd like A source package with yarn already build

Describe alternatives you've considered A static build without sqlite?

Additional context

memory ran out when build UI.

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x7f159be0ed78 node::Abort() [/lib64/libnode.so.93]
 2: 0x7f159bcfca73  [/lib64/libnode.so.93]
 3: 0x7f159d00ca20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib64/libnode.so.93]
 4: 0x7f159d00cde7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib64/libnode.so.93]
 5: 0x7f159d1cc7e5  [/lib64/libnode.so.93]
 6: 0x7f159d1e2654  [/lib64/libnode.so.93]
 7: 0x7f159d1e4749 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib64/libnode.so.93]
 8: 0x7f159d1e47d7 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib64/libnode.so.93]
 9: 0x7f159d1a4fcd v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/lib64/libnode.so.93]
10: 0x7f159d53d58a v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/lib64/libnode.so.93]
11: 0x7f159cf07d19  [/lib64/libnode.so.93]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It's a old machine and GLIBC is too old, directly run binary file fail with ./gotify-linux-amd64: /lib64/libc.so.6: version 'GLIBC_2.28' not found (required by ./gotify-linux-amd64), but memory not enough when I try to build ui (1GB ram), so sad..

jmattheis commented 5 months ago

You can try building the ui with more memory. e.g.

yarn react-scripts --max_old_space_size=4096 build

or

yarn react-scripts --max_old_space_size=4096 --openssl-legacy-provider build

depending on your node version.

Use docker if you cannot run the binary because of glibc incompatibilities.

chk-jxcn commented 5 months ago

Thank you @jmattheis , I have build it on other machine, but it's not very convenient, just a suggestion to make life easier.

jmattheis commented 5 months ago

I'll update the build system in the future to something more modern, this likely fixes the problem.