1 Star 0 Fork 200

Gitee Go / ThinkPHP Web应用部署案例

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

ThinkPHP Web应用部署案例

介绍

基于 GiteeGo 将 ThinkPHP6 Web 应用部署到指定云主机的实战案例

注意事项

在MasterPipeline.yml文件中,内置了部署阶段,如下图所示。用于将构建产出部署到远程主机上,如您不需要部署远程主机可删除此任务。如需要部署远程主机,请按照如下手册添加主机,并在yml中更改 hostGroupID。添加主机戳这里>>>

- stage: 
  name: deploy
  displayName: 部署
  steps:
    - step: deploy@agent
      name: deploy_agent
      displayName: '主机部署'
      # 请按照手册添加主机https://gitee.com/help/categories/76,并更改此ID
      hostGroupID: gitee-go-test
      deployArtifact:
          # 部署包来源,build表示来源于上游流水线,artifact表示来源于制品仓库,推荐使用build
        - source: artifact
          # 将部署包下载到主机后的部署包名,默认output
          name: output
          # 将部署包下载主机的具体目录,默认 ~/gitee_go/deoloy
          target: ~/gitee_go/deoloy
          # 上游制品名,只有当source为build时生效,默认output
          dependArtifact: output
          # 以下内容只有在source为artifact时生效,制品库名,默认default
          artifactRepository: release
          # 制品名,默认output
          artifactName: output
          # 制品版本,默认取最新
          artifactVersion: latest
      script: 
        |
        cd ~/gitee_go/deoloy
        tar zxvf output.tar.gz
        cd sourcecode/ && unzip sources.zip && rm sources.zip
        composer install && cd ..
        rm -fr ~/gitee_go/deoloy/default
        mv ~/gitee_go/deoloy/sourcecode ~/gitee_go/deoloy/default
        ln -s ~/gitee_go/deoloy/env-data/env ~/gitee_go/deoloy/default/.env
        rm output.tar.gz
        echo "Finish"

帮助手册

https://gitee.com/help/categories/69

ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) All rights reserved。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 Apache Licence是著名的非盈利开源组织Apache采用的协议。 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, 允许代码修改,再作为开源或商业软件发布。需要满足 的条件: 1. 需要给代码的用户一份Apache Licence ; 2. 如果你修改了代码,需要在被修改的文件中说明; 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 带有原来代码中的协议,商标,专利声明和其他原来作者规 定需要包含的说明; 4. 如果再发布的产品中包含一个Notice文件,则在Notice文 件中需要带有本协议内容。你可以在Notice中增加自己的 许可,但不可以表现为对Apache Licence构成更改。 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

基于 GiteeGo 将 ThinkPHP6 Web 应用部署到指定云主机的实战案例 expand collapse
PHP and 2 more languages
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gitee-go/thinkphp6-deploy-case.git
git@gitee.com:gitee-go/thinkphp6-deploy-case.git
gitee-go
thinkphp6-deploy-case
ThinkPHP Web应用部署案例
master

Search

344bd9b3 5694891 D2dac590 5694891