{"id":13805996,"url":"https://github.com/perchlabs/setupify","last_synced_at":"2026-01-24T09:33:35.216Z","repository":{"id":84199544,"uuid":"168823720","full_name":"perchlabs/setupify","owner":"perchlabs","description":"Setupify is a Phalcon provisioning and development tool.","archived":false,"fork":false,"pushed_at":"2022-04-17T20:33:48.000Z","size":152,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T22:08:46.993Z","etag":null,"topics":["bash-script","development-tools","phalcon","provisioning-scripts","zephir"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perchlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-lgpl-3.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-02T11:12:53.000Z","updated_at":"2022-10-07T05:55:14.000Z","dependencies_parsed_at":"2023-05-23T22:45:06.715Z","dependency_job_id":null,"html_url":"https://github.com/perchlabs/setupify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/perchlabs/setupify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perchlabs%2Fsetupify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perchlabs%2Fsetupify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perchlabs%2Fsetupify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perchlabs%2Fsetupify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perchlabs","download_url":"https://codeload.github.com/perchlabs/setupify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perchlabs%2Fsetupify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bash-script","development-tools","phalcon","provisioning-scripts","zephir"],"created_at":"2024-08-04T01:01:06.984Z","updated_at":"2026-01-24T09:33:35.201Z","avatar_url":"https://github.com/perchlabs.png","language":"Shell","funding_links":[],"categories":["Provisioning"],"sub_categories":[],"readme":"## Setupify Provisioning Tool\n\n**WARNING: Setupify is currently in a state of experimentation. Use tag release.**\n\nSetupify is a collection of bash scripts for provisioning a system. The included scripts emphasizes PHP and Zephir based tech, although it could be adapted to any use.  The bash scripts use only the most typical shell commands and so they should be portable to any modern Unix-like environment. Also included is a robust and optional `dialog` or `whiptail` shell menu program. One huge benefit of using Setupify as your starting point is that you can easily transition from PHP to Zephir based development.\n\n#### Intended Uses\n\n* Quick and flexible provisioning of a Zephir/Phalcon environment for development or testing.\n* As a starting point for provisioning a prioprietary application stack. In this case its a simple matter to delete sections and files before starting your enhancements.\n* As a starting point for any open source Phalcon or Zephir based tech stack\n\n#### How to start\n\nIn the `setup/` directory there are three files; `install`, `menu` and `settings`.\n\nBy running `./setup/install` without any arguments you will see the following:\n\n```\ndschissler@setupify:~/setupify$ ./setup/install\nAn OS name must be specified for provisioning.\nPossible OS names include:\nubuntu1804\n```\n\nSo you would run `./setup/install ubuntu1804` to start the automated provisioning. Setupify will first obtain sudo permissions for later use.\n\n### Menu Assisted Provisioning\n\nSetupify includes a powerful `dialog` or `whiptail` menu wizard. To run the menu program call:\n\n`./setup/menu`\n\nYou will see a screen for choosing the operating system.\n\n![Setupify Menu Overview](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/choose-os.png)\n\nYou may bypass this screen by supplying the operating system from the command line:\n\n`./setup/menu ubuntu1804`\n\nNext you will see the overview screen. Select the *\"Load Everything\"* entry.\n\n![Setupify Menu Overview](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/overview-load-everything.png)\n\nWe'll choose the *\"Customize\"* menu item. Notice how the installers are now defined.\n\n![Setupify Customize Overview](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/overview-customize.png)\n\nIf you were to choose *\"Install\"* at this point it would enter the automated provisioning in the exact same way as if you ran `./setup/install ubuntu1804`.\n\nInstead we'll first customize the *\"Phalcon\"* installer. So *Overview* --\u003e *Customize* --\u003e *Phalcon*.\n\n![Setupify Customize Overview](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/customize-hover-phalcon.png)\n\nPhalcon may be installed from; the official repository, tarball or git repository. We'll choose the respository method.\n\n![Phalcon Install Method](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/phalcon-method.png)\n\nWe'll choose the nightly channel. This is an easy way to get the latest Phalcon code.\n\n![Phalcon Repository Channel](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/phalcon-repository.png)\n\nSince we're developing a PHP extension that uses the latest Zephir language features we're going to want the latest tech.\n\nWe'll choose the *\"Git\"* installaton method.\n\n![Zephir Install Method](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/zcompiler-method.png)\n\nEnter the URL to the Zephir git repository. The default value should be the official Zephir location. If you were working on improving Zephir then you could choose your own forked repository.\n\n![Zephir Git Url](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/zcompiler-git-url.png)\n\nChoose the default *\"development\"* branch.\n\n![Zephir Git Branch](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/zcompiler-git-branch.png)\n\nIn this example we'll pretend that we've already provisioned the system and so we'll want to skip some of the time intensive operations. Choose the *\"Interests\"* item from the *\"Customize\"* menu.\n\n![Zephir Git Branch](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/customize-hover-interests.png)\n\nNow make sure the `PACKAGES` and `PECL` check boxes are deselected. This will skip some some unnecessary steps. This is most useful when developing so that you don't need to continually wait for irrelevant processes.\n\n![Zephir Git Branch](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/interests-all-unchecked.png)\n\nFinally return to the Overview screen. Notice that the installer methods are different than they first appeared. You are now ready to provision using the non-default methods.\n\n![Zephir Git Branch](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/overview-hover-ready-install.png)\n\n#### Create Custom Menus\n\nSetupify allows you to easily create custom menus. The `setup/lib/section/` directory contains sections which may each have an optional menu.  Setupify provides the following helper menus; `menuTarball`, `menuGit`, `menuRepository`, `menuPhar`. To create a new custom menu item simple create a new section directory and place a new menu file inside of it.\n\n**Create a helloworld menu with installer default**\n\nCreate an empty `setup/lib/section/helloworld/menu_helloworld.sh` file. This file does't need to be set as executable since it will be sourced instead of run directly.\n\nCreate a data file `setup/lib/section/helloworld/data.sh`\n\n```bash\nHELLOWORLD_DEFAULT=tarball:555.5555\n```\n\nNotice the `HELLOWORLD` installer in the status section as well as the `helloworld` menu item.\n\n![Zephir Git Branch](https://github.com/perch-foundation/media-resources/raw/master/setupify/v0.2/customize-helloworld.png)\n\nNote: This is a hack to quickly demonstrate how to add new setupify functionality. To do this properly you will need to follow the conventions laid out in the other section menus in the `setup/lib/sections/` directory.\n\n#### Installer Definitions\nSetupify is based around environment variable installer definitions. For example the `PHALCON_INSTALLER` variable describes both the method and version for installing Phalcon.  The installer variable is broken into two or three colon delineated sections depending on the installer method.  Some installer methods need more information than others.\n\nHere is the default Phalcon installer definition.  It states that Phalcon should be installed from the official stable repository.\n\n```bash\nPHALCON_INSTALLER=repository:stable\n```\n\nHere is a Phalcon installer definition for installing from the 4.0.5 tarball from the official releases.\n\n```bash\nPHALCON_INSTALLER=tarball:4.0.5\n```\n\nThis installs the same version but instead uses the tarball URL.\n\n```bash\nPHALCON_INSTALLER=tarball:https://github.com/phalcon/cphalcon/archive/v4.0.5.tar.gz\n```\n\nIt can also be used to install from a downloaded tarball.\n\n```bash\nPHALCON_INSTALLER=tarball:file:///home/dschissler/v4.0.5.tar.gz\n```\n\nFinally here is a git example.  Notice that there are three sections delineated by a colon.  Note that it reads from the left and so the colon in the `https:` is ignored.\n\n```bash\nPHALCON_INSTALLER=git:3.4.x:https://github.com/cphalcon/cphalcon.git\n```\n\nFor Zephir lets look at the installer method for using a PHAR program.\n\n```bash\nZCOMPILER_INSTALLER=phar:0.12.18\n```\n\nAgain a full URL can be used\n\n```bash\nZCOMPILER_INSTALLER=phar:https://github.com/phalcon/zephir/releases/download/0.12.18/zephir.phar\n```\n\n#### Alternative and more persistent settings\n\n1) You may define your installers and other settings in `./setup/settings`.\n\n2) You may also export your installer definitions from the shell. For example these commands will change the Phalcon repository to `mainline` without modifying `setup/settings`:\n\n```\ndschissler@setupify:~/setupify$ export PHALCON_INSTALLER=repository:mainline\ndschissler@setupify:~/setupify$ ./setup/install ubuntu1804\n```\n\nThis could be useful if you were going to be testing the provision many times from a single terminal.\n\n#### Powerful init.d provisioning stages\n\nSetupify provides powerful staged init scripts for configuring the system package manager, zephir_parser, Zephir and Phalcon.\n\nTo start look at the `setup/os/ubuntu1804/` directory.  You will see one file; `os.sh` and three directories `init.d/`, `functions/` and `lists/`.\n\n**Basic OS Parts**\n\n* `os.sh` defines operating specific settings. If you port setupify to a new OS or add capabilities to your init scripts then you'll likely want to change some of the settings.\n* `functions/` defines OS specific functions.  Define functions here and they will be available in the init scripts.\n* `lists/` stores basic lists like package names. Inside is the `package` and `pecl` files which simply list out the packages to install. This way you don't need to define your package lists in bash code. You can comment out lines in the lists by starting them with a hash.\n\n**init.d Scripts**\nThe `init.d/` directory is filled with number ordered executable scripts. For example script `00-foo.sh` runs before `01-fee.sh`. If ordering is an important matter then it is advised to not rely on alphabetic ordering of the name part but to instead assign the script a different numbered prefix.\n\nOut of the box the init scripts currently installs; system packages, PECL packages, zephir_parser, Zephir, Phalcon and Node.js. At the moment you will need to setup a database and web server yourself. There are just two many combinations for an initial release.\n\n**Interest Sections**\n\nYou can create \"interest\" environment variables within your init.d scripts that will allow you to toggle the execution of blocks of code or to completely skip the contents of a script.  Setupify will scan your code for any `^[A-Z]+_INTEREST$` variable patterns in your code.\n\nHere is a typical example of what happens when an interest is not defined:\n\n```bash\n[[ -z \"$PECL_INTEREST\" ]] \u0026\u0026 exit 0\n```\n\nThere are two standard ways to use interests depending on if the `install` or `menu` script is used.\n\n1) The `./setup/install` script is designed to be a one-stop-shop for installing a base system and so it will activate all interests in order to perform every operation.\n\n2) Te `./setup/menu` script starts with all interests disabled in order to allow you to turn on individual interests during the development process.  You may turn on interests by specifying *\"Load everything\"* from the main menu or by enabling individual interests in the *\"Interests\"* customize menu.  This is a core philosophical feature of setupify in that it allows you to use the same provision script for deployment as well as trying out new software versions during development.\n\nIn order to achieve the desired usability of setupify, please make sure that any operations peformed in your init.d scripts are indepotent.  For example: that means if a user is added to something that running the script again will not have a negative effect on the system either; by first checking that the user exists or by checking that adding the user again will not break anything or result in multiple entries.  If you can test each system modification for initial install as well as when it is performed a second time then you will be able to enjoy a production provisioning system that also doubles as an amazing development tool.\n\nBeing able to manually define interests can be exceedingly useful when developing new tech or testing your custom provisioning steps. If the answer to the question *\"Do I really want to wait for my PECL PHP extensions to compile each time that I check something?\"* is a *\"No!\"* then consider not turning on that interests steps while running the `menu` script.\n\n**Low tech script avoidance**\n\nAdditionally a low tech way to skip an entire init.d init script is to temporary rename it be prefixed with the hash character. For example renaming `01-foo.sh` to `#01-foo.sh` will cause it be ignored. This is a great low tech way of debugging your custom init.d scripts.\n\n**Init Script Failure**\n\nSometimes your init scripts will fail.  If any init script exits with a value other than `0` then the provisioning will be halted with an error message of the offending script.\n\n#### License\nSetupify is licensed under the terms of LGPL v3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperchlabs%2Fsetupify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperchlabs%2Fsetupify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperchlabs%2Fsetupify/lists"}