-
Put your project in git
-
On VPS install:
- git
- nginx
- node
- yarn
- build-essentials →
sudo apt-get install build-essential
- pm2 →
sudo yarn global add pm2
- mysql / postgresql / mongo (you should choose what db you defined for production env in config).
-
Clone your repo to vps
-
Run
yarn install --production=true
inside the project -
Build the project with
NODE_ENV=production yarn build
-
Configure nginx to proxy requests all requests from 80/433 to 1337(or what port you defined in strapi envs)
Done.
Also, take a look at this article, it’s pretty similar to strapi’s deployment.