Commit f1b6f3acf7437b3af4db28f21d8d062e58f6b77d

Authored by ly525
1 parent 2e123b64

add quick start docs

README.md
@@ -16,6 +16,30 @@ Mobile Page Builder&Generator with Drag&Drop @@ -16,6 +16,30 @@ Mobile Page Builder&Generator with Drag&Drop
16 16
17 </p> 17 </p>
18 18
  19 +
  20 +### 快速体验
  21 +> * 使用官方提供的 [***一键安装脚本***](https://raw.githubusercontent.com/ly525/luban-h5/dev/deploy/ubuntu-install.sh),简化安装步骤,在本地通过使用 Docker+Ubuntu 镜像,即可快速安装+体验 鲁班H5
  22 +
  23 +> * [快速体验-完整文档](https://github.com/ly525/luban-h5/wiki/Quick-Start(%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B%E7%AF%87)%EF%BC%9ADocker-Ubuntu-Image-for-Quick-Local-Dev)
  24 +
  25 +> * 简而言之:
  26 +
  27 +```bash
  28 +docker pull ubuntu
  29 +docker run -it -p 1234:80 -p 1235:1337 -v `pwd`:/app ubuntu
  30 +wget -qO- https://raw.githubusercontent.com/ly525/luban-h5/dev/deploy/ubuntu-install.sh | bash
  31 +
  32 +# 安装完成之后
  33 +# 1. visit :http://localhost:1234/admin,自定义配置账号密码,登录即可
  34 +# 1.2 配置相关权限,文档参见:https://ly525.github.io/luban-h5/zh/getting-started/quick-start.html#%E5%90%8E%E7%AB%AF%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA
  35 +
  36 +# 2. 鲁班前端
  37 +# 2.1 宿主机访问 「鲁班前端」:localhost:1234/main, 即可看到鲁班的前端
  38 +```
  39 +
  40 +<a href="https://terminalizer.com/view/b1432a8c2508"><img width="70%" alt="Gitter" src="https://user-images.githubusercontent.com/12668546/69896337-55d1ba00-1379-11ea-8a56-5122930d2501.png"></a>
  41 +
  42 +
19 ### 🔗Links/相关链接 43 ### 🔗Links/相关链接
20 - 文档 44 - 文档
21 * [📖中文在线文档](https://ly525.github.io/luban-h5/zh/) 45 * [📖中文在线文档](https://ly525.github.io/luban-h5/zh/)
deploy/ubuntu-install.sh
1 #/usr/bin/env 1 #/usr/bin/env
2 2
  3 +
  4 +###
  5 +# @Author: ly525
  6 + # @Date: 2019-11-30 13:24:57
  7 + # @LastEditors: ly525
  8 + # @LastEditTime: 2019-11-30 13:30:07
  9 + # @FilePath: /luban-h5/deploy/ubuntu-install.sh
  10 + # @Github: https://github.com/ly525/luban-h5
  11 + # @Description:
  12 + ## #!en: One-Click Setup Script to Install Luban-H5 on Ubuntu 18.04
  13 + ## #!zh: 鲁班H5 Ubuntu18.04 一键安装脚本
  14 + # @Copyright 2018 - 2019 luban-h5. All Rights Reserved
  15 + ###
  16 +
  17 +## !en:
  18 +######################################################
  19 +# One-Click Setup Script to Install Luban-H5 on Ubuntu 18.04
  20 +######################################################
  21 +
  22 +
  23 +######################################################
  24 +# Step1: Download && Run the Script
  25 +# docker pull ubuntu
  26 +# docker run -it -p 1234:80 -p 1235:1337 -v `pwd`:/app ubuntu
  27 +# wget -qO- https://raw.githubusercontent.com/ly525/luban-h5/dev/deploy/ubuntu-install.sh | bash
  28 +######################################################
  29 +
  30 +######################################################
  31 +# Step2: After the Script Runs
  32 +# 1. Luban H5 Admin
  33 +# 1.1 visit on your host machine:http://localhost:1234/admin, custom the username and password, then login the admin
  34 +# 1.2 config the permission,see more here:https://ly525.github.io/luban-h5/zh/getting-started/quick-start.html#%E5%90%8E%E7%AB%AF%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA
  35 +
  36 +# 2. Luban H5 Front-End
  37 +# 2.1visit on your host machine :http://localhost:1234/main, enjoy it!
  38 +######################################################
  39 +
  40 +######################################################
  41 +# Feedback
  42 +
  43 +# GitHub:https://github.com/ly525/luban-h5/issues
  44 +######################################################
  45 +
  46 +
  47 +## #!zh
3 ###################################################### 48 ######################################################
4 # [鲁班H5] Ubuntu18.04 一键安装脚本 49 # [鲁班H5] Ubuntu18.04 一键安装脚本
5 ###################################################### 50 ######################################################
@@ -84,7 +129,7 @@ function set_apt_mirror { @@ -84,7 +129,7 @@ function set_apt_mirror {
84 # 或替换为中科大镜像:https://lug.ustc.edu.cn/wiki/mirrors/help/ubuntu 129 # 或替换为中科大镜像:https://lug.ustc.edu.cn/wiki/mirrors/help/ubuntu
85 # sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list 130 # sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
86 # sudo sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list 131 # sudo sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
87 - # 132 + #
88 sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list 133 sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
89 apt update 134 apt update
90 135
@@ -154,7 +199,7 @@ function install_yarn { @@ -154,7 +199,7 @@ function install_yarn {
154 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - 199 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
155 echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list 200 echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
156 # https://yarnpkg.com/en/docs/install#debian-stable 201 # https://yarnpkg.com/en/docs/install#debian-stable
157 - apt-get remove -y cmdtest 202 + apt-get remove -y cmdtest
158 apt-get update 203 apt-get update
159 apt-get install -y yarn 204 apt-get install -y yarn
160 success yarn 205 success yarn
@@ -312,7 +357,7 @@ function install_luban-h5 { @@ -312,7 +357,7 @@ function install_luban-h5 {
312 cd - 357 cd -
313 358
314 # 鲁班后端 359 # 鲁班后端
315 - cd luban-h5/back-end/h5-api/ 360 + cd luban-h5/back-end/h5-api/
316 yarn 361 yarn
317 yarn build # build strapi admin 362 yarn build # build strapi admin
318 pm2 start server.js 363 pm2 start server.js