Hello: I am already in the pre-production stage for a Mojolicious app, so I want to integrate it with systemd in CentOS 7, following the example at https://github.com/kraih/mojo/wiki/Integrating-hypnotoad-with-systemd-and-rsyslog
- My server has two users: *developer *and *tester*, for the obvious roles of developing, and local testing, before going to online staging and production. - The user tester environment is similar to the future online environment - Each user has it own PerlBrew, with Perl 20 THE PROBLEM: It works PERFECTLY in the *tester* environment if I start the app using *$hypnotoad scripts/my_app* But it doesn’t work using the systemd script. MY ASSUMPTIONS: 1.- I execute the script as root - It will be used in the startup or in a Monit script - So I need to test it logged as root or with sudo 2.- The service must be executed as the user *tester* - I added the line *User=tester *to the script 3.- The hypnotoad path for ExecStart, ExecStop and ExecReload is different because of PerlBrew, so I edited the script - Now it is at */home/tester/perl5/perlbrew/perls/perl-5.20.1/bin/hypnotoad* THE RESULTS: - If I write an absolute path por the app (*/home/tester/path-to-the-app*), Mojolicious itself complains about it cant’t found it in @INC - If I write *$HOME/path-to-the-app-from-the-user-directory* the script runs “fine", even it says that a .pid has been created, BUT it is not true!!!! In the log says that the app exited, and that .pid number does not exists in the running processes list in the server. Any suggestions? I do not know if something in some log or in the app code can help to understand my problem or if some of my assumptions are wrong [Some side notes about my developer setup before going online: everything is local: files are copied between *developer* and *tester* using Git; the app runs behind a Niginx server; css, jss and templates are served by Nginx; it resolves to a intranet .foo domain configured locally in BIND in a virtual CentOS 7 installed in Parallels for Mac; it uses Mojo::Pg with also a local database] -----> and it all works starting hypnotoad with the command line!! so I think that all hard work is already well done. Thank you: Nacho B. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
