Dear Joshua, I am starting pm2 via a systemd service unit, /etc/systemd/system/dspace-angular.service:
[Unit] Description=DSpace Angular (PM2) After=network.target tomcat9.service Wants=tomcat9.service [Service] User=dspace Group=dspace LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity Environment=NODE_ENV=production Environment=PM2_HOME=/home/dspace/.pm2 Restart=on-failure WorkingDirectory=/home/dspace/src/git/dspace-angular ExecStart=/home/dspace/.node_modules/lib/node_modules/pm2/bin/pm2 start ./dist/server/main.js --name dspace-ui -i 4 --no-daemon ExecReload=/home/dspace/.node_modules/lib/node_modules/pm2/bin/pm2 reload dspace-ui ExecStop=/home/dspace/.node_modules/lib/node_modules/pm2/bin/pm2 stop dspace-ui # Don't log pm2 to the systemd journal! Use pm2 logs instead. StandardOutput=null [Install] WantedBy=multi-user.target Then start and enable the service like you would any other system service. Works well, but I'm surprised at how pm2 makes this difficult. I find pm2's ergonomics very strange. In the service file above you can see I tell pm2 to not start its own management daemon. How can so much of the insanely massive Node.js ecosystem depend on this random package for clustering? And how can there be no other alternatives? Bizarre... Hope that helps, On Tue, Jan 9, 2024 at 12:15 AM Joshua Kim <josh...@udel.edu> wrote: > Hello, > > Does anyone use automatic start for dspace front end at reboot by using > service ? If so, would you share with us? The 7.x documentation shows only > manual start like pm2 start dspace-ui.json. > > -- > All messages to this mailing list should adhere to the Code of Conduct: > https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx > --- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dspace-tech+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/2b8f0685-8327-4eac-9f0e-683c7d8c22ben%40googlegroups.com > <https://groups.google.com/d/msgid/dspace-tech/2b8f0685-8327-4eac-9f0e-683c7d8c22ben%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Alan Orth alan.o...@gmail.com https://picturingjordan.com https://englishbulgaria.net https://mjanja.ch -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAKKdN4WP0Y7V55%2BLPGzh_QHcyZeHpX64b%2Bp5xg5vJkPdsH5CEw%40mail.gmail.com.