System Information
-
Strapi Version: 3.6.8
-
Operating System: RHEL 7
-
Database: mysql 10.6.4-MariaDB
-
Node Version: 10.16.0 <=14.x.x"
-
NPM Version: 6.0.0
-
Yarn Version: 1.22.11
Hi,
I am a new comer to Strapi. I am using it to replace an old Magnolia CMS and we are in the POC phase at the minute. I am trying to find best practices for running Strapi. So currently I run it like this
nohup yarn strapi start &
Which is fine however the developers wanted to use graphgl which requires Strapi to run in development mode otherwise they get this error
The autoReload feature is required to use this feature.
If I try to run in develop mode and send to nohup/background like this
nohup yarn strapi develop &
The server constantly restarts so I have to run in the foreground whcih obviously not work iin a production environment. Am I missing something obvious on how to install and run Strapi?
Thanks
Hi @darthelephant we have an entry for this in our FAQ here: Troubleshooting - Strapi Developer Documentation
But I’ll summarize it here:
Due to how Node.js works, in order for changes to take effect, that would require Node to restart the server. This could potentially cause downtime of your production service and likewise these changes should be tracked in some kind of source control.
Generally your “flow” of development would follow the following path:
- Development - Develop your Strapi application locally on your host machine, then push changes into source control
- Staging - Deploy changes from source control to a “production-like” environment for testing
- Production - If no other changes are needed, deploy into production
- Repeat as needed, it is recommended that you properly version and test your application as you go
At this time and in the future there is no plan to allow model creating or updating while in a production environment, and there is currently no plans to move model settings into the database. There are no known nor recommended workarounds for this.
Strapi deployments are closely coupled with source control and we strongly recommend that you do development locally, push that code into staging with atomic test data, then if everything looks good you deploy that code in production.
1 Like
Thank you. Thats great information for a noob
1 Like
All good, everyone starts small at first and your knowledge grows the more you play 
1 Like