Hello,
There is a server with Ubuntu on which the Strapi backend and NextJS frontend are running in production.
The server has: Nginx, NodeJS, NextJS, Yarn, NPM, pm2
I need to create a script that will deploy a copy of the project on a new server. The new server already has: Nginx, NodeJS, NextJS, Yarn, NPM, pm2
There is already a script (a copy of the script is attached) that archives all project files into a zip file. It copies the Nginx config and exports the Strapi config.
The backup script places all files in the /home/BackUP/ folder.
I will place in the /home/Restore folder all the files that were backed up in the /home/BackUP/ folder, and the script (that you will write) should start the project on a clean server after running, restoring everything from the backups located in the /home/Restore folder.
1) There is a nuance that in Strapi on the new server it seems necessary to create a user before importing the Strapi config. That is, the script should also automate this issue.
2) I have saved all dependencies for the project and I archive them in a zip file, accordingly, when restoring the project, use these dependencies instead of downloading them from the internet. Make it so that the restoration occurs without any downloads from the internet (currently the dependency is in the repository, tomorrow it may be removed and the project will not start).
Please suggest timelines and costs.
Thank you