{"id":15616376,"url":"https://github.com/druidfi/omen","last_synced_at":"2025-09-23T23:54:19.491Z","repository":{"id":35396288,"uuid":"217461405","full_name":"druidfi/omen","owner":"druidfi","description":"Read the clouds and detect Drupal environment","archived":false,"fork":false,"pushed_at":"2024-10-03T03:23:22.000Z","size":153,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-04T01:11:24.401Z","etag":null,"topics":["configuration","drupal","drupal-10","drupal-9","env","lagoon","lando","settings"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/druidfi.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}},"created_at":"2019-10-25T05:57:51.000Z","updated_at":"2024-10-02T01:36:12.000Z","dependencies_parsed_at":"2024-10-22T19:41:18.005Z","dependency_job_id":null,"html_url":"https://github.com/druidfi/omen","commit_stats":{"total_commits":120,"total_committers":2,"mean_commits":60.0,"dds":0.01666666666666672,"last_synced_commit":"29c2443bba5a991102c22beb61d45ff2dd8e1a88"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/druidfi/omen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fomen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fomen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fomen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fomen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druidfi","download_url":"https://codeload.github.com/druidfi/omen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fomen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276668530,"owners_count":25683073,"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-09-23T02:00:09.130Z","response_time":73,"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":["configuration","drupal","drupal-10","drupal-9","env","lagoon","lando","settings"],"created_at":"2024-10-03T07:07:30.883Z","updated_at":"2025-09-23T23:54:19.457Z","avatar_url":"https://github.com/druidfi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# druidfi/omen\n\n![Tests](https://github.com/druidfi/omen/workflows/Tests/badge.svg)\n\nDrupal ENV detector. Detects env related configuration and sets them for you. Helps with moving sites from environment\nto another. Aims also to generalize your env configuration.\n\nAlso sets configuration per environment type. e.g. for development or production. Everything can still be overridden in\nyour project.\n\n**You should just focus on your project specific configuration.**\n\n## How to use\n\nRequire omen in your composer.json:\n\n```console\ncomposer require druidfi/omen\n```\n\nAnd then use this as your `sites/default/settings.php`:\n\n```php\n\u003c?php\n\n// Use druidfi/omen\nextract(Druidfi\\Omen\\Reader::get(get_defined_vars()));\n```\n\nOr print out all configuration (aka debug):\n\n```php\n\u003c?php\n\n// Print out detected configuration by druidfi/omen\nDruidfi\\Omen\\Reader::show(get_defined_vars());\n```\n\nSee the whole example [here](settings.php).\n\n## Known environments\n\n- [Amazee.io Lagoon](https://docs.lagoon.sh/)\n- [DDEV Local](https://ddev.readthedocs.io/en/latest/)\n- [Lando](https://lando.dev/)\n- [Pantheon](https://pantheon.io/) - Work in Progress\n- [Tugboat](https://www.tugboat.qa/)\n- [Wodby](https://wodby.com/)\n\n## What is detected?\n\n- Loading of setting files and service configurations\n- Database connection\n- Trusted host pattern(s)\n- File paths (public, private, temp)\n- Hash salt\n- Contrib module settings (which are affected by env)\n  - [Simple Environment Indicator](https://www.drupal.org/project/simplei)\n\n## APP_ENV\n\nWith `APP_ENV` you can force a running configuration. E.g. you can run with `test` configuration on `dev` environment.\nThis means that e.g. the database credentials do not change but caching settings do change.\n\nValues: `dev`, `test` or `prod` (default: `prod`)\n\n## Drupal configuration mapping\n\nDrupal configuration can be overridden using ENV variables.\n\n| Variable                                       | ENV override                   | Default value            |\n|------------------------------------------------|--------------------------------|--------------------------|\n| `$databases['default']['default']['database']` | `DRUPAL_DB_NAME`               | :heavy_multiplication_x: |\n| `$databases['default']['default']['driver']`   | `DRUPAL_DB_DRIVER`             | `'mysql'`                |\n| `$databases['default']['default']['host']`     | `DRUPAL_DB_HOST`               | :heavy_multiplication_x: |\n| `$databases['default']['default']['password']` | `DRUPAL_DB_PASS`               | :heavy_multiplication_x: |\n| `$databases['default']['default']['port']`     | `DRUPAL_DB_PORT`               | `3306`                   |\n| `$databases['default']['default']['username']` | `DRUPAL_DB_USER`               | :heavy_multiplication_x: |\n| `$settings['config_sync_directory']`           | `DRUPAL_CONFIG_SYNC_DIRECTORY` | `'conf/cmi'`             |\n| `$settings['file_public_path']`                | `DRUPAL_FILE_PUBLIC_PATH`      | `'sites/default/files'`  |\n| `$settings['file_private_path']`               | `DRUPAL_FILE_PRIVATE_PATH`     | `FALSE`                  |\n| `$settings['file_temp_path']`                  | `DRUPAL_FILE_TEMP_PATH`        | `'/tmp'`                 |\n| `$settings['hash_salt']`                       | `DRUPAL_HASH_SALT`             | `'0000000000000000'`     |\n\n:heavy_multiplication_x: Detected or required\n\n## Defaults for environment types\n\nSee [src/Defaults.php](src/Defaults.php) for values.\n\nSee current default values by environment:\n\n| Variable                                                    | Development | Testing  | Production |\n|-------------------------------------------------------------|-------------|----------|------------|\n| `$config['system.logging']['error_level']`                  | `'all'`     | `'hide'` | `'hide'`   |\n| `$config['system.performance']['cache']['page']['max_age']` | `0`         | `900`    | `900`      |\n| `$config['system.performance']['css']['preprocess']`        | `0`         | `1`      | `1`        |\n| `$config['system.performance']['js']['preprocess']`         | `0`         | `1`      | `1`        |\n| `$settings['skip_permissions_hardening']`                   | `TRUE`      | `FALSE`  | `FALSE`    |\n\nSame for all environments:\n\n- `$settings['config_exclude_modules']` = `['devel','stage_file_proxy','upgrade_status']`\n- `$settings['config_sync_directory']` = `'conf/cmi'`\n\n## TODO\n\nAdd support for:\n\n- Detect e.g. Solr, Redis and Varnish configuration where available\n- Other dev tools and hosting environments\n- Default values for some contrib modules\n\n## Where the name \"Omen\" comes from?\n\nDruids interpreted the waves of the ocean or read clouds for mundane or important omens. So `reading clouds` is\nbasically what `druidfi/omen` is doing. Your local clouds too.\n\n## Other information\n\nThis project can be found from the Packagist: https://packagist.org/packages/druidfi/omen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruidfi%2Fomen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruidfi%2Fomen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruidfi%2Fomen/lists"}