Continuous integration O not OK? Beautiful not Beautiful? Don’t Harasho Harasho?


This article is a summary of what we’ve learned recently about implementing automated continuous integration deployments after uploading local development to Github.

Premise:

I have two servers,

One is Google a year free of charge configuration higher (run Jenkins, mysql, docker, directing and redis)

A minimal ESC for Tencent Cloud (running personal development projects such as blogs)

Prepare in advance:

Have Jenkins, Docker and Nginx on your server

Main steps:

1. Upload the project to Github

2.Jenkins received the update on GitHub => pull the latest code package => send it to the Nignx directory of Tencent Cloud ESC

3. Decompress the file => Generate the docker container => run the container

4. Configure the nginx. Conf file


Making configuration webhook



Git configuration for Jenkins task

Webhook configuration for Jenkins task



Jenkins task push over SSH configuration




Jenkins task node environment configuration




Build steps for the Jenkins task




Nignx docker install nginx

Docker-volumes /nginx/ WWW: docker-volumes/nginx/ WWW: docker-volumes/nginx/ WWW: docker-volumes/nginx/ WWW Will map to the container’s HTML directory under nginx.


Nginx configuration (remember to restart nginx after configuration, it will take effect)


General steps like this, if not very clear you can leave a message in the comment section ~

Learn from each other

Qq: 335829832

Blog: Blog.migaox.com will be updated from time to time