-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Describe the bug
For one who wants to monitor with PM2 in a Docker image (or not with Docker), there seems to be a TypeError on executing pm2-runtime.
The app silently crashes with
pm2 startas it's running inside a daemon.
The error occurs when running locally without using Docker. I can guess it's because of the old use of require(), but Pylon outputs a ESM file instead of CommonJS. Is there any way around this?
To Reproduce
Steps to reproduce the behaviour:
- Create a default Pylon app.
- Edit the last few lines of the Dockerfile to:
# Install PM2 as a project dependency (not global, due to user permissions)
RUN bun add pm2
# Run the app
USER bun
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "run", "pm2-runtime", "--interpreter", "bun", "/usr/src/pylon/.pylon/index.js" ]Expected behavior
PM2 starts monitoring.
Additional context
Metadata
Metadata
Assignees
Labels
No labels