{"id":29774895,"url":"https://github.com/lemachinarbo/compwser","last_synced_at":"2026-05-18T06:40:30.717Z","repository":{"id":299950144,"uuid":"1004703814","full_name":"lemachinarbo/comPWser","owner":"lemachinarbo","description":"The lazy way to install processwire + GitHub deploys","archived":false,"fork":false,"pushed_at":"2025-07-08T05:13:38.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T09:02:23.163Z","etag":null,"topics":["composer","processwire","rockmigrations","rockshell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemachinarbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T03:55:51.000Z","updated_at":"2025-07-08T05:13:41.000Z","dependencies_parsed_at":"2025-06-19T05:24:49.737Z","dependency_job_id":"ca8c7c2a-ce24-457a-a6b7-2c292c8e110d","html_url":"https://github.com/lemachinarbo/comPWser","commit_stats":null,"previous_names":["lemachinarbo/compwser"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lemachinarbo/comPWser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemachinarbo%2FcomPWser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemachinarbo%2FcomPWser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemachinarbo%2FcomPWser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemachinarbo%2FcomPWser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemachinarbo","download_url":"https://codeload.github.com/lemachinarbo/comPWser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemachinarbo%2FcomPWser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267334033,"owners_count":24070485,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["composer","processwire","rockmigrations","rockshell"],"created_at":"2025-07-27T09:00:58.855Z","updated_at":"2026-05-18T06:40:30.660Z","avatar_url":"https://github.com/lemachinarbo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# comPWser\n\nA one-command setup to install ProcessWire and wire up GitHub deploys to staging, prod, testing, or dev.\n\n\u003e Based on [RockMigrations deployments](https://www.baumrock.com/en/processwire/modules/rockmigrations/docs/deploy/#update-config.php) and following [processwire.dev structure](https://github.com/MoritzLost/ProcessWireDev/blob/master/site/02-setup-and-structure/02-integrate-composer-with-processwire.md).\n\nWith ComPWser you can do 2 things:\n1. [Quick Install Processwire](#21-quick-install-processwire)\n2. Set up [automated GitHub Actions](#22-quick-deployment-setup-with-github-actions) to deploy your site to production (or staging, testing, etc.).\n3. Nop, only two.\n\n\n**Contents**\n\n  - [1. Requirements](#1-requirements)\n  - [2. Quick Install Processwire](#2-quick-install-processwire)\n  - [3. Quick Auto Deployment via GitHub Actions](#3-quick-auto-deployment-via-github-actions)\n  - [4. F.A.Q](#4-faq)\n  - [5. Step by step guide](./.build/docs/guide.md)  \n  \n  \n## 1. Requirements\n- DDEV\n- Composer (Included by default with DDEV)\n- PHP \u003e= 8.0\n- Unix-like environment (Linux, macOS, or WSL on Windows)* *Only tested on Linux*\n\n## 2. Quick Install Processwire\nSet the `docroot` of your DDEV container to `public` by updating `docroot: public` in `./.ddev/config.yaml`, then download the Composer project file and run the install.\n\n```sh\nddev config --docroot=public\nddev restart\nwget https://raw.githubusercontent.com/lemachinarbo/comPWser/main/composer.json\nddev composer install\n```\n\n### 2.1. What It Does\n- Downloads [ProcessWire](https://github.com/processwire/processwire/)\n- Installs ProcessWire in `/public`\n- Initializes a local Git repository with main as the initial branch \n- Adds [RockMigrations](https://github.com/baumrock/RockMigrations) and [RockShell](https://github.com/baumrock/RockShell) as Git submodules\n- Installs the RockMigrations module\n- Backups Database\n- Cleans up leftover core files\n- Downloads build files (`./build`) in case you want to set up GitHub Workflows for deployment\n- Adds a `.gitignore` file for your repository\n\nHappiness.\n\n## 3. Quick Auto Deployment via GitHub Actions\n\nTo setup deployment environments, we link each environment with its own branch:\n\n- Production environment → main/master branch\n- Staging environment → staging/develop branch\n- testing environment → tests/testing branch\n- And so on...\n\nThe branch names don’t matter, but keep in mind we’re assuming you’re following an environment-based branching model. This setup doesn’t fit workflows like [trunk-based development](https://atlassian.com/continuous-delivery/continuous-integration/trunk-based-development).\n\n\u003e [!TIP]\n\u003e We have a more detailed [step-by-step guide](./.build/docs/guide.md)\n\n### Steps\n\n1. Create a [new GitHub repository](https://github.com/new) for your project, with an initial `main` branch. Then, add it as a remote to your local repo and push your ProcessWire project to it.\n\n2. Create a [Personal Access Token](https://github.com/settings/personal-access-tokens) with access to the repository you created and Read/Write access for `actions`, `contents`, `deployments`, `secrets`, `variables`, and `workflows`.\n\n3. Create an environment file using the [.env template](https://github.com/lemachinarbo/comPWser/blob/main/.build/templates/.env.example) and complete all the information:\n\n```sh\nmv ./.build/templates/.env.example ./.env\n```\n\n4. Create the `SSH keys` and upload them to your remote server:\n\n```sh\nchmod +x ./.build/scripts/sshkeys-generate.sh \u0026\u0026 ./.build/scripts/sshkeys-generate.sh\n```\n\n5. Install [GitHub CLI](https://github.com/cli/cli#installation) and, once installed, authenticate by running:\n\n```sh\ngh auth login\n```\n\nSelect `id_github.pub` as your public SSH key when prompted.\n\n6. Run the installer and follow the steps to create an environment. The name is up to you — `production`, `staging`, `stage`, `prod`, `dev`, `test`, whatever suits you.\n\n```sh\nchmod +x ./.build/setup.sh \u0026\u0026 ./.build/setup.sh\n```\n\n\u003e [!IMPORTANT]\n\u003e If you need multiple environments (e.g., production, staging, testing), update the `.env` accordingly and run `./.build/setup.sh` **once per environment**.\n\nOnce the installer finishes, check your site in the browser.\nFrom now on, just commit and push to the branch for the environment you want to update — your changes go live automatically.\n\n\n### 3.1. What It Does\n- Prompts you at each step so you can skip or rerun any part of the setup\n- Checks for all requirements: `.env` file, SSH keys, GitHub CLI, and repository access\n- Offers to generate missing SSH keys and register them with your server\n- Sets up GitHub Actions variables and secrets for your chosen environment\n- Lets you select which branch to link to your deployment environment and generates workflow files\n- Creates or updates `config-local.php` from your `.env` file for environment-specific\n- Syncs all project files—including ProcessWire, RockShell, and modules—to your remote server\n- Imports your local database to the server for the selected environment\n- Updates the server folder structure and permissions for automated deployments\n\nWhere to go next? Check what else you can do when [moving to production](https://www.baumrock.com/en/processwire/modules/rockmigrations/docs/deploy/#rockshell-filesondemand) for tips on how to handle files, images, etc.\n\nNice. Time to enjoy some cake.\n\n## 4. F.A.Q\n\n### 4.1. Why are you downloading ProcessWire with composer?\n\nBecause I would love to use the *GitHub Workflows deployment* thing without committing the `wire` folder to my repository and I hope/suspect composer will be the way.\n\n### 4.2. Why do you say `with one command` if installation requires more than one?\n\nIt’s more catchy… and honestly, my original intention was just one command, but turns out I needed more. Classic rookie “I-can-do-everything-because-I-learned-to-type-into-the-AI-chat-box” miscalculation.\n\n### 4.3. Can I personalize the ProcessWire installation rather than accept your opinionated defaults?\n\nTo install ProcessWire, I am using [PWInstaller](https://github.com/lemachinarbo/RockShell/blob/8ddcea56fe1cd7c678ba18df81b1834a6b1fd27f/App/Commands/PwInstaller.php), a variation of [Bernhard's installer](https://github.com/baumrock/RockShell/blob/21d6808c35fbbcbf192f05b3fd3d88fa96b2b7cf/App/Commands/PwInstall.php) that allows you to skip the prompts and install ProcessWire using some default settings. If you want an interactive ProcessWire installation, simply remove the `--lazy` parameter in the `composer.json` file\n\n```\n[ -f RockShell/rock ] \u0026\u0026 php RockShell/rock pw:installer --lazy || echo 'RockShell command not available'\n```\n\nlike this:\n\n```\n[ -f RockShell/rock ] \u0026\u0026 php RockShell/rock pw:installer || echo 'RockShell command not available'\n```\n\nIf you want to keep your custom settings Installer, update `$lazyDefaults` on PWInstaller command.\n\n```php\nprivate $lazyDefaults = [\n// Host/General\n// 'host' =\u003e 'foo.ddev.site', // host is autodetected but can be overridden\n'debug' =\u003e false,\n'download_processwire' =\u003e true,\n'processwire_version' =\u003e 'dev',\n'download_rockfrontend' =\u003e false,\n'profile' =\u003e 'site-blank', // site-rockfrontend requires download_rockfrontend to be true\n// Database\n'dbName' =\u003e 'db',\n'dbUser' =\u003e 'db',\n'dbPass' =\u003e 'db',\n'dbHost' =\u003e 'db',\n'dbCon'  =\u003e 'Hostname',\n'dbPort' =\u003e 3306,\n'dbCharset' =\u003e 'utf8mb4',\n'dbEngine' =\u003e 'InnoDB',\n'dbTablesAction' =\u003e 'remove', // remove existing tables if pw is already installed\n// Admin\n'admin_name' =\u003e 'processwire',\n'username' =\u003e 'ddevadmin',\n'userpass' =\u003e 'ddevadmin',\n'userpass_confirm' =\u003e 'ddevadmin',\n'useremail' =\u003e 'admin@example.com',\n// Site\n'timezone' =\u003e 'America/Bogota', // find yours at https://www.php.net/manual/en/timezones.php\n'debugMode' =\u003e 1,\n];\n```\n\n### 4.4. What's with the cake?  \n\nThe cake is a lie.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemachinarbo%2Fcompwser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemachinarbo%2Fcompwser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemachinarbo%2Fcompwser/lists"}