2017 © Pedro Peláez
 

project deploy-automator

Phalcon + Swoole Framework Bootstrap

image

phwoolcon/deploy-automator

Phalcon + Swoole Framework Bootstrap

  • Tuesday, September 12, 2017
  • by Fishdrowned
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Deploy Automator for Phwoolcon Projects

Work Flow

  1. [You]           bin/build then cd ignore/release then git push to release (or staging, production) branch;
  2. [Automator] Captures the push webhook;
  3. [Automator] Invoke dep local:prepare prepare to pull the codes;
  4. [Automator] Invoke rsync to push codes under ./workspace/current to the remote server(s);
  5. [Automator] Invoke bin/cli migrate:up and bin/dump-autoload on the remote server(s).

Requirements

Usage

1. Install PHP

add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-fpm php7.1-gd php7.1-cli php7.1-curl php7.1-dev php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-zip php-redis

2. Install Phalcon

curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | bash
apt install php7.0-phalcon

3. Install Deploy Automator

git clone -b release git@github.com:phwoolcon/deploy-automator.git ./

4. Config Deploy Automator

vim app/config/production/app.php

```php <?php return [ 'enable_https' => true, // true if your site have https access, otherwise false 'timezone' => 'Asia/Shanghai', // Use your timezone 'url' => 'https://deploy.example.com', // Use your real site URL ];, (*1)


```bash vim app/config/production/database.php

```php <?php return [ 'default' => 'mysql', 'connections' => [ 'mysql' => [ 'host' => '127.0.0.1', // Use real server 'username' => 'dbuser', // Use real username 'password' => 'dbpass', // Use real password 'dbname' => 'dbname', // Use real db name ], ], ];, (*2)

### 5. Init Deploy Automator
```bash
sudo -H -u www-data bin/dump-autoload
sudo -H -u www-data bin/cli migrate:up
sudo -H -u www-data bin/dump-autoload

6. Nginx Setup

See example/etc/nginx/, (*3)

7. Supervisor Setup

See example/etc/supervisor/, (*4)

8. Create SSH Private Key

sudo -H -u www-data ssh-keygen -N "" -t rsa -b 4096 -C "deployer"

9. Remote Server Setup

Create user deployer on the remote server to receive code pushes (via rsync, using ssh connection)., (*5)

sudo adduser --disabled-password deployer

Grant deployer sudo permission to run as www-data, add sudo config:, (*6)

sudo visudo -f /etc/sudoers.d/deployer

with content:, (*7)

deployer ALL=(www-data) NOPASSWD:ALL

The Versions

12/09 2017

dev-release

dev-release

Phalcon + Swoole Framework Bootstrap

  Sources   Download

Apache-2.0

The Requires

 

framework swoole phalcon phwoolcon

12/09 2017

dev-master

9999999-dev

Deploy Automator for Phwoolcon Projects

  Sources   Download

Apache-2.0

The Requires

 

deployer phwoolcon