承接 iescarro/deploy 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iescarro/deploy

最新稳定版本:v0.0.8

Composer 安装命令:

composer require iescarro/deploy

包简介

A very simple deployment tool

README 文档

README

Prerequisites

  • PHP installed on the server
  • SSH access to the server
  • Composer installed

Installation

composer require iescarro/deploy
php vendor/iescarro/deploy/install

After installation, this should copy deploy script, .env.deploy file and configuration in application/config/deploy.php.

Configuration

If you need to modify the contents of application/config/deploy.php, you can edit it

<?php

$deploy = array(
    'production' => array(
        'host' => getenv('DEPLOY_HOST'),
        'user' =>  getenv('DEPLOY_USER'),
        'key_path' => getenv('DEPLOY_SSH_KEY_PATH'),
        'port' => getenv('DEPLOY_PORT'),
        'tasks' => array(
            array(
                'name' => '',
                'command' => getenv('DEPLOY_TASK_CHANGE_DIR'),
            ),
            array(
                'name' => '',
                'command' => 'git pull'
            ),
            array(
                'name' => '',
                'command' => 'composer2 install'
            )
        )
    )
);

like adding a staging and testing deployment. Additionally you can configure more commands like removing composer.lock and other Linux commands you need to configure. Values are retrieved from .env so we can refer to .env.deploy for the names. Add it to .env file and change the values to meet with your deployment. The .env.deploy is just for reference, we can copy those configurations in .env like so

# More configurations above from .env file

DEPLOY_HOST=server_ip_address
DEPLOY_PORT=server_port
DEPLOY_USER=your_user
DEPLOY_SSH_KEY_PATH=~/.ssh/id_rsa
DEPLOY_TASK_CHANGE_DIR=cd domains/some.com/public_html

Deploy

We can easily deploy our project via

php deploy
# or php deploy stage for staging deployment

Troubleshooting

  • Ensure that the SSH key is correctly configured.
  • Verify that the server has the necessary PHP extensions installed.
  • Check the server logs for any errors during deployment.

Additional Resources

统计信息

  • 总下载量: 146
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-28