-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Strapi in process manager doesn't reload the app on saving changes #1008
Comments
i have the same problem |
Hello @bartoszgajda55 you just have to use So if you use pm2 it will not work. It hasn't be design for your use case. |
I have Strapi running on VPS and I can't have terminal window open all the time with strapi start command running in it. What would you suggest then ? |
Maybe pm2 --watch help? |
@bartoszgajda55 you can replace |
Thanks @lauriejim, that fixed the problem :) |
Hello, I also found a solution for this problem. With this command you don't have to edit the
|
Do we have news about the auto restart feature? @lauriejim |
PR is open here #1854 |
i have the same problem, too |
First npm install pm2 -g const strapi = require('strapi'); pm2 start server.js |
Standing in your Strapi root project run:
Now recall that running Strapi with NPM script is With this in mind let us decompose the
Now you have started the Strapi server under PM2 and the former will be restarted whenever the server is rebooted. You can manually restart the process. See the docs link above. Hope this clarifies things a bit more than just a command line code. |
@GabrielSuttner thanks for that. Does anyone know if there's a production solution? |
The CTB is disabled in staging and production: https://strapi.io/documentation/v3.x/getting-started/troubleshooting.html#why-can-t-i-create-or-update-content-types-in-production-staging |
If you start with server.js, try it. |
Informations
What is the current behavior?
Strapi run using PM2 or Forever doesn't reload on saving content change (like adding new content type) and therefore changes are not seen
Steps to reproduce the problem
Run Strapi using process manager like PM2: pm2 start server.js --name api
What is the expected behavior?
When new content is saved, the app reloads as it does when run using strapi start command
Suggested solutions
The text was updated successfully, but these errors were encountered: