Relocation Notes for Old Projects

Time:2019-10-9

Receiving a friend’s request for help, he now encounters a difficult problem.

Just started the company, the project does not have GIT, the old version of TP, CI, code is also messy, directories are very many, some are not placed on the server, there are nearly 30G user avatars on the server, in short, a word “chaotic”.

I’m going to reorganize this messy company project, server and architecture. Next, please see my show

backups

Since there is no git, you don’t need git, just pack it online, download the FTP link, and in the absence of any clue, I recommend that you reinstall it directly. If you’re not sure, don’t die.

Corporate Business Summary Structure

  • New interface application
  • Background application
  • Old Interface Applications

After careful investigation, only the avatar of the resource file exists locally, and the others are saved on Qiniu. That’s easy to pack. It will not affect the normal use of users.

Download the project locally after packaging.

The database uses Ali Cloud, so ignore it directly.

The process lasted five hours… There are indeed many things.

To configure

Apache is used by the company, find the Vhost file, copy it to the local, sort out all the configuration files, directories and so on.
His company requires Nginx, so I need to sort out the configuration files one by one, then find the certificate of SSL for nginx, everything is ready.

Senseless forwarding

I own a 4-core 4G Aliyun ECS, and their company’s volume is not large, so I’m ready to deploy the project to my server, load balancing on the company’s server, increasing our IP weight, and introducing user traffic to our server.

Demo is as follows:

ProxyPass / balancer://proxy/
<Proxy balancer://proxy> 
        BalancerMember http://192.168.6.37:6888/  loadfactor=3 
        BalancerMember http://192.168.6.38:6888/  loadfactor=1 
</Proxy> 

After forwarding user traffic, the enemy server is reset and ready for redeployment.

Recommended Today

Mongoose error: getaddrinfo ENOTFOUND localhost localhost:27017

{ Error: getaddrinfo ENOTFOUND localhost localhost:27017 at errnoException (dns.js:50:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26) code: ‘ENOTFOUND’, errno: ‘ENOTFOUND’, syscall: ‘getaddrinfo’, hostname: ‘localhost’, host: ‘localhost’, port: 27017 } mongoose.connect(‘mongodb://localhost:27017/db1’,{ poolSize:5, useNewUrlParser: true },err=>{ if(err){ console.error(err) }else { Console.log (‘mongodb successfully connected ‘) } }) Try changing localhost to 127.0.0.1 mongoose.connect(‘mongodb://127.0.0.1:27017/db1’,{ poolSize:5, useNewUrlParser: true },err=>{ if(err){ console.error(err) […]