Download raw body.
[new] www/uptime-kuma + www/pm2 - fancy self hosted uptime monitor
[new] www/uptime-kuma + www/pm2 - fancy self hosted uptime monitor
Hi Aisha,
There is the poc for devel/npm module. The plan is a lang/node module including
yarn(s) and pnpm, a corepack like.
Idealy I would like to make a cache and let npm do its magic (.bin for example)
but it looks harder to implement (hash structure I guess). The perl script
ignore optional dependencies by default but not devDependencies (uptime-kuma use
--omit=dev), there is room for improvement. To mirror the node_modules shape I
had to use cp for some conflicts and I give up implementing a proper tree using
ln after my first try (looks like there is a reason for all those pkgmgr around
node). Actually I think npm also cp some dirs in this case but I'm not sure.
make modnpm-gen-modules > modules.inc, then include it. On post-extract
(finalise, the module one, not the target), the module will move each
dependencies to its place in ${WRKSRC}/node_modules except for version conflict
on sub-depends it will use a temp dir then a second list of cp instructions.
Some remark.
The perl script is in the same folder as the module and I use an absolute path
to call it. This is not the proper way.
The module use DIST_TUPLE so it prepand GH for DISTNAME, I update your Makefile
but we can also implement the module without, I guess.
The module use ${WRKSRC}/.npm and your install is a cp -a thus those duplicates
directories, the special conflict case on multiple dependencies, got installed.
I would recommand a more fine grained install but I also think this .npm have
nothing todo in ${WRKSRC} thus I add MODNPM_post-extract += rm -rf ${WRKSRC}/.npm ;)
On uptime-kuma, I change the do-build into post-extract and added NO_BUILD.
I left PLIST.orig so you can compare. Btw update-plist took a while on locate,
is there any tricks to speed up this step ?
I did just make install, will try the port later. Please, let me know if it fail
to run. In uptime-kuma we may be missing a npm build phase (vite) but maybe this
is the release content in dist. In both, we may be missing optionnal
dependencies and the .bin from npm. Finally, uptime-kuma definitly need a way to
remove devDependencies from the npm module (hughe difference in the PLIST).
Thanks for any comments,
Fabien.
On 29/03/2024 16:40, aisha wrote:
> Hi,
>
> I've attached a port for www/uptime-kuma along with www/pm2, which help in setting up a self hosted monitoring application based on nodejs. Seems like newer versions of node allow a level of caching so I've been able to create these ports with a npm-cache tarball. The port Makefile contains a step to generate the cache (which needs internet access) but if using the tarball and unpacking the cache web access is no longer needed (at least in my testing).
>
> Not all modules and functionality of uptime-kuma has been tested so I may be missing some run time deps. PM2 is required for running uptime-kuma, a README in uptime-kuma shows how to start the server. rc.d file has not been created.
> It's currently crashing on creating a DNS monitor and will need manual intervention by editing the SQLite database by hand, so I suggest not creating a DNS monitor for now. HTTPS and Ping monitors seem to be working. Others have not been tested out.
>
> DESCR for www/uptime-kuma
>
> Uptime Kuma is an easy-to-use self-hosted monitoring tool.
> It comes with a lot of knobs and features, such as:
> - Monitoring uptime for HTTP(s) / TCP/ HTTP(s) Keyword /
> HTTP(s) Json Query / Ping / DNS Record / Push /
> Steam Game Server / Docker Containers.
> - Fancy, Reactive, Fast UI/UX
> - Notifications via Telegram, Discord, Gotify, Slack,
> Pushover, Email (SMTP), and 90+ other notification services.
> - 20-second intervals
> - Multi Languages
> - Multiple status pages
> - Map status pages to specific domains
> - Ping chart
> - Certificate info
> - Proxy support
> - 2FA support
>
> DESCR for www/pm2
>
> PM2 is a daemon process manager that helps manage and keep applications
> online. PM2 comes with an inbuilt load balancer, code refresh
> functionality and support for multiple languages for deploying code.
>
> Please test out, feedback is welcome.
> OK to import?
>
> Cheers,
> Aisha
[new] www/uptime-kuma + www/pm2 - fancy self hosted uptime monitor
[new] www/uptime-kuma + www/pm2 - fancy self hosted uptime monitor