gin-web-docker

Docker Compose一键部署Gin Web, 解决构建部署烦恼

Stars
4
Committers
1

# : 
# , , clone
 gin-web-docker # 
  tpl # 
      app # 
      redis # redis
  .gitignore # git
  .dockerignore # docker
  README.md # 

shell(unix)

git clone [email protected]:piupuer/gin-web-docker.git
cd gin-web-docker
chmod +x control.sh

# 
echo xxx > tpl/app/web_image
echo xxx > tpl/app/ui_image
# 
source ./env
# 
# export RUN_MODE=stage
# machine id(0-9)
./control.sh id 8
# redis 3()
./control.sh sentinel 3
# 
./control.sh fast 3

nginx

docker-conf/nginxnginx(Ubuntu/etc/nginx)

nginx.confpiupuer-local.com(), hosts, ip192.168.1.105

sudo vim /etc/hosts

# /etc/hosts
192.168.1.105 piupuer-local.com

docker-compose, : http://piupuer-local.com:10001, nginx/docker-compose

Ubuntu 18.04docker

# docker
apt-get update
apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
   "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
apt-get update
apt-get install docker-ce

# docker-compose
curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

QQ943724601

MIT License

Copyright (c) 2022 piupuer