# example **Repository Path**: liuweiliang/example ## Basic Information - **Project Name**: example - **Description**: 机动组项目搭建 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-06-23 - **Last Updated**: 2022-07-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: Laravel ## README # Ⅰ 机动组 框架搭建 (example); **前置阅读** ``` 1.所有命令在 docker 容器内项目根目录执行; 进入容器命令: docker exec -it xb_workbench bash 2.文档下部分 有 建表规范 路由规范 命名规范 开发目录说明(职责说明) 等 3.初始化配置 .env、install、dump-autolaod (storage bootstrap 777 权限等) (生成 generate 密钥 ) 请在容器项目根目录执行 ./init.sh 4.赋予 log & bootstrap 权限 请在容器根目录执行 ./give_log_permissions.sh ``` **开始搭建: 方法a 和 方法b(请阅读 INSTALL-B.md) 任意选择一种** ## 方法a #### a-1 克隆项目 example ```angular2html a-1-1、git clone https://gitee.com/liuweiliang/example.git ``` #### a-2 根据项目更改配置 ```angular2html a-2-1、克隆本仓库项目,仅需将 composer.json 文件内 autoload->psr-4 下 映射目录更改为 项目 目录与命名空间, 如下图2 更改蓝色箭头 和 红色箭头 3项 a-2-2、_example 所有下文件的命名空间 更换掉 如图2 红色箭头所指 a-2-3、config/yimq.php ,config/micro.php ``` #### a-3 创建 .env 文件 并执行命令 ```angular2html a-3-1、创建 .env 文件 并将 .env.example 内容覆盖到 .env a-3-2、执行 ./init.sh 前置阅读3 ``` #### a-4 切换到 workspace 目录下 并且 重启容器 ```angular2html a-4-1、docker-composer restart ``` #### a-5 配置虚拟域名 ```angular2html a-5-1、windows hosts 文件 记得映射 虚拟域名(与项目内 nginx.conf 中 server_name 一致) a-5-2、mac /etc/resolver/test 文件 并写入 nameserver 127.0.0.1 ``` #### a-6 测试访问 框架 ```angular2html a-6-1、example.test {nginx.conf 中 server_name} /example/install ``` ##### 图1 ![img_3.png](img_3.png) ##### 图2 ![img_2.png](img_2.png) ```angular2html ------- 方法a END 请前往 DEV-SPECIFICATION.md 阅读开发规范 --------- ```