{"id":27078924,"url":"https://github.com/netlogix/netlogix.supervisor","last_synced_at":"2025-07-11T14:15:49.107Z","repository":{"id":45969918,"uuid":"429823467","full_name":"netlogix/Netlogix.Supervisor","owner":"netlogix","description":"Create supervisor program groups and programs via CLI with neos","archived":false,"fork":false,"pushed_at":"2024-09-05T11:58:14.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T14:35:50.179Z","etag":null,"topics":["flow","supervisor","supervisord"],"latest_commit_sha":null,"homepage":"","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/netlogix.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-19T14:19:13.000Z","updated_at":"2024-08-23T13:34:43.000Z","dependencies_parsed_at":"2024-08-23T15:05:41.198Z","dependency_job_id":"79132614-b868-42bf-9ef5-7704fde8144c","html_url":"https://github.com/netlogix/Netlogix.Supervisor","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":0.5,"last_synced_commit":"a3917d31b34a309df0df74557a44a6df3b3b5ccd"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.Supervisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.Supervisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.Supervisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.Supervisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlogix","download_url":"https://codeload.github.com/netlogix/Netlogix.Supervisor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421004,"owners_count":20936208,"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":["flow","supervisor","supervisord"],"created_at":"2025-04-06T01:20:00.369Z","updated_at":"2025-04-06T01:20:00.893Z","avatar_url":"https://github.com/netlogix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Netlogix.Supervisor\n===================\n\nThis package creates supervisor configuration files via flow CLI.\n\nConfiguration files are named \"group-something.conf\" when they contain a\nsupervisor group configuration or \"program-something.conf\" when they contain\na supervisor program configuration. Both are created at\nConfiguration/Supervisor within your application.\n\n\nSetup:\n------\n\nSupervisor allows to \"include\" other files and even allows for globbing.\n\n```conf\n# cat /etc/supervisor/supervisord.conf\n[include]\nfiles=/etc/supervisor/conf.d/*.conf /var/www/*/Configuration/Supervisor/group.conf /var/www/*/Configuration/Supervisor/program*.conf\n```\n\nCreating supervisor files dynamically is intended to be a compile time step,\npreferably on deployment.\n\n\nAvailable configuration options:\n--------------------------------\n\nProgram settings get passed to the supervisor configuration file without\nvalidation, so every current and future configuration option is available.\n\nSee: http://supervisord.org/configuration.html#program-x-section-settings\n\nAvailable flow commands:\n-----------------------\n```\n./flow supervisor:create          Creates supervisor configuration\n./flow supervisor:startgroups     Starts all programs of configured groups\n./flow supervisor:stopgroups      Stops all programs of configured groups\n./flow supervisor:updategroups    Reloads config and starts/stops programs accordingly\n```\nCreate supervisor settings via YAML:\n------------------------------------\n\nAlthough supervisor programs can be created entirely via yaml, those are\nbasically static because the yaml configuration format does not provide\niteration or dynamic construction mechanisms.\n\n```yaml\nNetlogix:\n    Supervisor:\n\n        programs:\n\n            changes-command-controller-polling-action:\n\n                command: './flow changes:poll ; sleep 5'\n                name: 'this-is-a-program'\n                environment: \"FLOW_CONTEXT='%env:FLOW_CONTEXT%'\"\n                directory: \"%FLOW_PATH_ROOT%\"\n```\n\nFor more details: See Configuration/Settings.yaml.example\n\n\nCreate supervisor settings via PHP:\n-----------------------------------\n\nThere is a `Provider` interface which allows other packages to hook an and\ncreate Supervisor `Program` settings in a completely programmatic manner.\n\n```php\nclass Provider implements \\Netlogix\\Supervisor\\Provider\n{\n    /**\n     * @return array\u003c\\Netlogix\\Supervisor\\Model\\Program\u003e\n     */\n    public function getPrograms(): array\n    {\n        $name = 'this-is-a-program';\n        $groupName = 'default';\n        $command = './flow changes:poll ; sleep 5';\n        $programSettings = [\n            'environment' =\u003e  \\sprintf(\n                \"FLOW_CONTEXT='%s'\",\n                Bootstrap::getEnvironmentConfigurationSetting('FLOW_CONTEXT') ?: 'Development'\n            ),\n            'directory' =\u003e \\FLOW_PATH_ROOT\n        ];\n        return [\n            new \\Netlogix\\Supervisor\\Model\\Program(\n                $name,\n                $groupName,\n                $command,\n                $programSettings\n            );\n        ];\n    }\n}\n```\n\n\nConfigure group settings:\n-------------------------\n\nGroups are created on demand as soon as a program assigns itself to the\ngroup. This means groups don't need to be configured beforehand or even at all.\n\nIf no further configuration is presented, the supervisor group name is\ngenerated from the \"groupName\" configuration option of a program.\n\nGroups can override their names. This menas several programs can e.g. refer\nto the same group \"default\" but the group can be renamed if different\napplications share a common supervisor daemon.\n\nThis setting also provides a priority setting.\n\n```yaml\nNetlogix:\n  Supervisor:\n\n    groups:\n      default:\n        name: \"%FLOW_PATH_ROOT%\"\n        priority: 200\n```\n\n\nRenamed identifiers:\n--------------------\n\nBoth, group names and program names need to be cleaned to comply with\nsupervisors naming scheme. This is done automatically, so even if the\ngroup name is configured as `%FLOW_PATH_ROOT%` it will be transformed to\n`var-www-document-root`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnetlogix.supervisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlogix%2Fnetlogix.supervisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnetlogix.supervisor/lists"}