- 8.9.0 (可能会根据版本迭代变更)
git clone https://github.com/stefaniepei/react-redux-ts-ssr.git
$ npm install -g cnpm
$ npm install -g pm2
$ npm install -g ts-node
$ npm install -g typescript
$ cnpm install
npm run deploy
$ pm2 startOrRestart ecosystem.config.js --env production
server {
listen 80;
server_name xxx.com;
access_log off;
error_log /data1/app/log/nginx/error.log warn;
rewrite /assets/(\d+)/(.+)$ /$2 last;
location / {
proxy_pass http://127.0.0.1:1114/;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
location ~ /(status|ping).*$ {
allow 54.227.248.211;
allow 127.0.0.1;
deny all;
fastcgi_pass unix:/tmp/php553.sock;
fastcgi_index index.php;
include fastcgi.conf;
} location ~ .svn {
return 403;
} location /NginxStatus { stub_status on; access_log off; allow 54.227.248.211; allow 127.0.0.1; deny all; } }
- 解决每次部署都需要输入密码的命令: 打开本地git bash输入:
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
如果是MAC找不到ssh-copy-id命令,请先安装
brew install ssh-copy-id