Browse Source

README.md新增docker-compose的使用文档

SliverHorn 4 years ago
parent
commit
eff2a637ca
2 changed files with 71 additions and 0 deletions
  1. 35 0
      README-zh_CN.md
  2. 36 0
      README.md

+ 35 - 0
README-zh_CN.md

@@ -69,6 +69,41 @@ Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-adm
 
 ## 2. 使用说明
 
+> 使用docker-compose体验本项目
+- 安装 docker-compose [官方文档](https://docs.docker.com/compose/install/)
+    - ```shell script
+       # 在Linux安装
+       # 1.1 运行此命令以下载Docker Compose的当前稳定版本
+       sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
+       # 1.2 将可执行权限应用于二进制文件
+       sudo chmod +x /usr/local/bin/docker-compose 
+      ```
+    - ```shell script
+       # 使用Python的pip安装 
+       pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
+      ```
+    - 使用 Docker Desktop 
+        - Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
+        - Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
+
+- 使用git克隆本项目
+    - ```git
+        git clone https://github.com/flipped-aurora/gin-vue-admin.git
+      ```
+- 使用docker-compose up一键启动启动项目
+    - ```shell script
+      # 使用docker-compose启动四个容器
+      docker-compose up
+      # 如果您修改了某些配置选项,可以使用此命令重新打包镜像
+      docker-compose up --build
+      # 使用docker-compose 后台启动
+      docker-compose up -d
+      ```
+
+    - web项目预览 [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
+
+    - swagger文档 [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
+
 ```
 - node版本 > v8.6.0
 - golang版本 >= v1.11

+ 36 - 0
README.md

@@ -71,6 +71,42 @@ We are excited that you are interested in contributing to gin-vue-admin. Before
 
 
 ## 2. Getting started
+
+> Use docker-compose to experience this project
+- Installation docker-compose [Official document](https://docs.docker.com/compose/install/)
+    - ```shell script
+       # Install on Linux
+       # 1.1 Run this command to download the current stable version of Docker Compose
+       sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
+       # 1.2 Apply executable permissions to binary files
+       sudo chmod +x /usr/local/bin/docker-compose 
+      ```
+    - ```shell script
+       # Use Python's pip installation
+       pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
+      ```
+    - Use Docker Desktop 
+        - Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
+        - Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
+
+- Use git to clone this project
+    - ```git
+        git clone https://github.com/flipped-aurora/gin-vue-admin.git
+      ```
+- Use docker-compose up to start the startup project with one click
+    - ```shell script
+      # Use docker-compose to start four containers
+      docker-compose up
+      # If you modify some configuration options, you can use this command to repackage the image
+      docker-compose up --build
+      # Use docker-compose to start in the background
+      docker-compose up -d
+      ```
+
+    - Web project preview [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
+
+    - swagger APIs [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
+
 ```
 - node version > v8.6.0
 - golang version >= v1.11