# Deployment
# Aliyun/Tencent Cloud/Digital Ocean
- Preinstall
First of all, you need to install some basic software on your server(centos), please install them yourself (refer to its official website documents for details)
node、npm、yarn、pm2
The following scripts are just for your information
# install yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn -y
# install nginx
sudo yum install nginx -y
# install pm2
npm install pm2 -g
# pm2 examples
# pm2 start server.js
# pm2 stop server
# pm2 restart server
# pm2 stop all
- Run the code on the server
# just run the following code on the server
git clone https://github.com/ly525/luban-h5.git
cd luban-h5
./luban-h5.sh init # installation dependency, build front-end and back-end
./luban-h5.sh start # just start the service
./luban-h5.sh stop # stop the service
- How to access
- configure the firewall security group and add port
1337
. - visit
http://ServerIP:1337/admin
to get the admin panel for luban-h5 - config the API permissions, see more here (opens new window)
- visit
http://ServerIP:1337
to get the app
- configure the firewall security group and add port
# Docker deployment
TODO
# Heroku
Because Strapi + postgresql still has some pits on Heroku and needs official solution, this solution is temporarily pending.