{"id":34595068,"url":"https://github.com/byteinternet/hypernode-deploy-configuration","last_synced_at":"2026-01-20T13:01:11.215Z","repository":{"id":40762797,"uuid":"490636301","full_name":"ByteInternet/hypernode-deploy-configuration","owner":"ByteInternet","description":"Configuration objects for Hypernode Deploy","archived":false,"fork":false,"pushed_at":"2025-12-24T11:40:04.000Z","size":138,"stargazers_count":11,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-25T22:58:45.549Z","etag":null,"topics":["deployment","hypernode","magento2","shopware6"],"latest_commit_sha":null,"homepage":"https://github.com/ByteInternet/hypernode-deploy","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ByteInternet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-10T09:50:28.000Z","updated_at":"2025-12-24T09:41:48.000Z","dependencies_parsed_at":"2023-02-17T21:15:35.404Z","dependency_job_id":"b4e2440b-933d-44ff-984b-f3062a3ac42f","html_url":"https://github.com/ByteInternet/hypernode-deploy-configuration","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":"0.28301886792452835","last_synced_commit":"959628f305cea2ba17b5e195cce67fc853942c03"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/ByteInternet/hypernode-deploy-configuration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteInternet%2Fhypernode-deploy-configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteInternet%2Fhypernode-deploy-configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteInternet%2Fhypernode-deploy-configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteInternet%2Fhypernode-deploy-configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ByteInternet","download_url":"https://codeload.github.com/ByteInternet/hypernode-deploy-configuration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteInternet%2Fhypernode-deploy-configuration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: 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":["deployment","hypernode","magento2","shopware6"],"created_at":"2025-12-24T11:28:56.210Z","updated_at":"2026-01-20T13:01:11.203Z","avatar_url":"https://github.com/ByteInternet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hypernode Deploy Configuration\nThese documentation is the guide to painlessly setup an automated deploy on the [Hypernode](https://www.hypernode.com/) platform.\nThe repository contains:\n\n- Configuration objects\n- Deploy configuration templates\n- CI configuration templates\n- Documentation\n\n## Whats inside?\n- Deployer configuration hosts / tasks\n- Hypernode server setup\n- Email / New Relic notification\n- Cloudflare flush\n\n## Configuration\n1. Composer `require hypernode/deploy-configuration --dev` package. Only needed when you want to have autocomplete in your `deploy.php`\nfile.\n2. Copy a `deploy.php` template inside the root of your project as `deploy.php`. You can find the template in\n[templates/deploy.php](./templates/deploy.magento2.php).\nAs you can see a `$configuration` variable is assigned an instance of a `Configuration` class.\nThis configuration object contains the whole deploy configuration and can be altered to your needs using getters/setters.\nChange configuration matching you use case, and refer to the documentation for other build in configurations and tasks.\n3. Setup your CI server\n    1. GitLab CI [templates/.gitlab-ci.yml](./templates/.gitlab-ci.yml).\n    2. Bitbucket [templates/bitbucket-pipelines.yml](./templates/bitbucket-pipelines.yml).\n    3. Github Actions [templates/github-actions.yml](./templates/github-actions.yml).\n4. For Magento 2 your first build will fail due to missing configuration. Login to the server and depending on your project file edit\nthe `app/etc/env.php` or `app/etc/local.xml`. You will find these files in `~/apps/\u003cdomain\u003e/shared/`.\n\n## Build steps\n\n### 1. Build\n\nBuilds the application to prepare to run in a production environment.\n\nYou can define commands which needs to be executed during the build stage as follows:\n\n``` php\n$configuration-\u003eaddBuildTask('deploy:vendors');\n```\n\nThis command will execute a `composer install` in your project folder install all project dependencies.\n\nAll possible commands can be found in the `Hypernode\\DeployConfiguration\\Command\\Build` namespace.\nRefer to the API docs for usage and options.\n\nThis repository contains a few application templates which specifies the common tasks and their order to get the application build correctly.\nSee application templates for more information.\n\n### 2. Deploy\n\nDeploys the application which was build in the build stage to a given set of hosts.\n\nFirst you need to define your environments / infrastructure.\n\n``` php\n$stageAcceptance = $configuration-\u003eaddStage('acceptance', 'acceptance.mydomain.com');\n$stageAcceptance-\u003eaddServer('appname.hypernode.io');\n```\n\nTo set extra SSH options (https://www.ssh.com/academy/ssh/config) for your server you can also provide these.\nFor example:\n\n``` php\n$stage-\u003eaddServer('appname.hypernode.io', [], [], ['LogLevel' =\u003e 'verbose']);\n```\n\nYou can define tasks which needs to be executed during the `deploy` stage as follows:\n\n``` php\nuse function Deployer\\{run, task};\n\n...\n\ntask('magento:cache:flush', static function () {\n    run('{{bin/php}} {{release_or_current_path}}/bin/magento cache:flush');\n});\n\n$configuration-\u003eaddDeployTask('magento:cache:flush');\n```\n\nAll possible commands can be found in the `Hypernode\\DeployConfiguration\\Command\\Deploy` namespace.\nRefer to the API docs for usage and options.\n\n### 3. Provision Platform services / configurations\n\nOptionally you can have some services and application configurations setup automatically from your git repository to the Hypernode platform\n\nFor example you could maintain your cron configuration in your GIT repository and have it automatically deployed to particular servers.\n\n``` php\n$configuration-\u003eaddPlatformConfiguration(\n    (new PlatformConfiguration\\CronConfiguration())-\u003esetStage('production')\n);\n```\n\nOr setup a varnish instance\n\n``` php\n$configuration-\u003eaddPlatformService(new \\Hypernode\\DeployConfiguration\\PlatformService\\VarnishService());\n```\n\nFor all possible tasks and configuration please refer to the API docs.\n\n### 4. AfterDeploy tasks\n\nAfter deploy tasks are triggered after a successful deployment.\nFor example notifications are available.\n\nUsage:\n``` php\n$configuration-\u003eaddAfterDeployTask(new \\Hypernode\\DeployConfiguration\\AfterDeployTask\\SlackWebhook());\n```\n### 5. Brancher servers for acceptance/integration testing\n\nUsage:\n``` php\n$stage = $configuration-\u003eaddStage('test', 'test.domain.com');\n$stage-\u003eaddBrancherServer('appname');\n```\n\n## Application template\n\nWe provide a few application template which define the common set of tasks to be executed for a specific application type.\nYou could use those so you don't have to specify each task manually.\n\nAvailable templates:\n- [Magento 1](src/ApplicationTemplate/Magento1.php)\n- [Magento 2](src/ApplicationTemplate/Magento2.php)\n- [Shopware 6](src/ApplicationTemplate/Shopware6.php)\n\nExample usage:\n`$configuration = new ApplicationTemplate\\Magento2(['nl_NL']);`\n\n## Environment variables\nSome specific environment variables are required to allow the deploy image access to the git repository\nor to be able to send out notifications.\n\n### Required\n- `SSH_PRIVATE_KEY` Unencrypted SSH key. The key needs to have access to the remote server(s). \n  May be base64 encoded like this:\n  ``` console\n  cat ~/.ssh/deploy_key | base64\n  ```\n\n### Optional\n- `DEPLOY_COMPOSER_AUTH` Composer auth.json contents. This file is required if you require access to specific Composer\nrepositories like Magento's, 3rd party vendors, or even your own private Composer package repository. If this environment\nvariable does not exist, no `auth.json` will be written, so it is optional.\nThe auth.json must be base64 encoded like this:\n  ``` console\n  cat auth.json | base64\n  ```\n- `HYPERNODE_API_TOKEN` The Hypernode API token to be used for the project. Request one at support@hypernode.com. \n\n## Testing\nTo test your build \u0026 deploy, you can run `hypernode-deploy` locally.\n\nFirst make sure you have all the required env variables setup using.\n\n``` console\nexport SSH_PRIVATE_KEY=***\nexport DEPLOY_COMPOSER_AUTH=***\nexport HYPERNODE_API_TOKEN=***\n.... etc\n```\n\nThen start your build / deployment run command from root of the project.\n\n*repeat -e \u003cENV\u003e for all env vars that are present during build*\n``` console\ndocker run -it \\\n    -e SSH_PRIVATE_KEY -e DEPLOY_COMPOSER_AUTH -e HYPERNODE_API_TOKEN \\\n    -v `pwd`:/build hypernode/deploy \\\n    hypernode-deploy build -vvv\ndocker run -it \\\n    -e SSH_PRIVATE_KEY -e DEPLOY_COMPOSER_AUTH -e HYPERNODE_API_TOKEN \\\n    -v `pwd`:/build hypernode/deploy \\\n    hypernode-deploy deploy acceptance -vvv\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteinternet%2Fhypernode-deploy-configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteinternet%2Fhypernode-deploy-configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteinternet%2Fhypernode-deploy-configuration/lists"}