Use Azure Devops Pipeline to build && deploy your project

this post will teach you how to deploy your own Docker registry and how to use Microsoft Azure Devops to automatically building your Github Go project, and deploy to your Docker Swarm Server

How it works

Use Azure Devops Pipeline to build && deploy your project - 1

  1. Pipeline download your github project
  2. Build your code by Dockerfile, make docker image then push to your own Docker registry
  3. Execute Bash command in Pipeline, pull off latest image of your project then update Docker swarm service

Continue reading Use Azure Devops Pipeline to build && deploy your project

Write a Microservice via Go-Micro

i’ve learning Go-Micro approximate a month, that i wanna write an article to record what i learned, in case i forgot it, i still can pick up it it by this article, what i wrote about might be inaccurate, i’m very glad that you can correct it.

Architecture

Write a Microservice via Go-Micro - 1

my design about Microservices architecture

Continue reading Write a Microservice via Go-Micro

小时候看不懂的鲁迅

鲁迅的文章,中小学生都是不大爱读的,毕竟鲁迅的思想距年轻人太远。至于大学生,除了学中国文学的,恐怕也不会有什么人主动去找鲁迅的书看。
只有成年人,在社会太久并自以为得的时候,再来读读鲁迅,也许才能明白。
Continue reading 小时候看不懂的鲁迅

websocket nginx reverse proxy configuration

location /test {
        proxy_pass http://127.0.0.1:8080/ws; # target address

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_http_version 1.1;
        # websocket headers
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 30;
}