{"id":19854711,"url":"https://github.com/phwoolcon/deploy-automator","last_synced_at":"2026-04-16T15:05:17.360Z","repository":{"id":57041319,"uuid":"99346459","full_name":"phwoolcon/deploy-automator","owner":"phwoolcon","description":"Deploy Automator for Phwoolcon Projects","archived":false,"fork":false,"pushed_at":"2017-09-12T09:20:04.000Z","size":1124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T13:50:54.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phwoolcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-04T13:40:48.000Z","updated_at":"2017-08-04T13:41:25.000Z","dependencies_parsed_at":"2022-08-24T01:10:56.157Z","dependency_job_id":null,"html_url":"https://github.com/phwoolcon/deploy-automator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fdeploy-automator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fdeploy-automator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fdeploy-automator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fdeploy-automator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phwoolcon","download_url":"https://codeload.github.com/phwoolcon/deploy-automator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241244974,"owners_count":19933295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:10:12.413Z","updated_at":"2026-04-16T15:05:17.309Z","avatar_url":"https://github.com/phwoolcon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Automator for Phwoolcon Projects\n\n## Work Flow\n1. `[You]`\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; `bin/build` then `cd ignore/release` then `git push` to `release` (or `staging`, `production`) branch;\n1. `[Automator]` Captures the push webhook;\n1. `[Automator]` Invoke `dep local:prepare prepare` to pull the codes;\n1. `[Automator]` Invoke `rsync` to push codes under `./workspace/current` to the remote server(s);\n1. `[Automator]` Invoke `bin/cli migrate:up` and `bin/dump-autoload` on the remote server(s).\n\n## Requirements\n* [`Comopser`](https://github.com/composer/composer)\n* [`Deployer`](https://github.com/deployphp/deployer)\n\n## Usage\n\n### 1. Install PHP\n```bash\nadd-apt-repository ppa:ondrej/php\napt update\napt 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\n```\n\n### 2. Install Phalcon\n```bash\ncurl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | bash\napt install php7.0-phalcon\n```\n\n### 3. Install Deploy Automator\n```bash\ngit clone -b release git@github.com:phwoolcon/deploy-automator.git ./\n```\n\n### 4. Config Deploy Automator\n```bash\nvim app/config/production/app.php\n```\n```php\n\u003c?php\nreturn [\n    'enable_https' =\u003e true,                 // true if your site have https access, otherwise false\n    'timezone' =\u003e 'Asia/Shanghai',          // Use your timezone\n    'url' =\u003e 'https://deploy.example.com',  // Use your real site URL\n];\n```\n\n```bash\nvim app/config/production/database.php\n```\n```php\n\u003c?php\nreturn [\n    'default' =\u003e 'mysql',\n    'connections' =\u003e [\n        'mysql' =\u003e [\n            'host'       =\u003e '127.0.0.1',    // Use real server\n            'username'   =\u003e 'dbuser',       // Use real username\n            'password'   =\u003e 'dbpass',       // Use real password\n            'dbname'     =\u003e 'dbname',       // Use real db name\n        ],\n    ],\n];\n```\n### 5. Init Deploy Automator\n```bash\nsudo -H -u www-data bin/dump-autoload\nsudo -H -u www-data bin/cli migrate:up\nsudo -H -u www-data bin/dump-autoload\n```\n\n### 6. Nginx Setup\nSee [example/etc/nginx/](example/etc/nginx/)\n\n### 7. Supervisor Setup\nSee [example/etc/supervisor/](example/etc/supervisor/)\n\n### 8. Create SSH Private Key\n```bash\nsudo -H -u www-data ssh-keygen -N \"\" -t rsa -b 4096 -C \"deployer\"\n```\n\n### 9. Remote Server Setup\nCreate user `deployer` on the remote server to receive code pushes (via `rsync`, using `ssh` connection).\n\n```bash\nsudo adduser --disabled-password deployer\n```\nGrant `deployer` sudo permission to run as `www-data`, add sudo config:\n```bash\nsudo visudo -f /etc/sudoers.d/deployer\n```\nwith content:\n```ini\ndeployer ALL=(www-data) NOPASSWD:ALL\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Fdeploy-automator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphwoolcon%2Fdeploy-automator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Fdeploy-automator/lists"}