Part of the Services ecosystem · 4 projects
This module provides a way to set Drupal service parameters using environment variables. You can configure these variables by prefixing them with `DRUPAL_SERVICE_` and using double or triple underscores to denote nesting. This allows for flexible configuration of services based on your deployment environment.
A simple helper that allows setting service parameters by environment variables.
Usage
1. Install as usual.
2. Set environment variables following this pattern:
DRUPAL_SERVICE_{ variable }={ value }
The variable name following the same rules:
- Casing is kept as is
- '__' is replaced by dots (".").
- '___' is used for setting nested array structures
Usage examples
Setting Drupal's CORS values:
DRUPAL_SERVICE_cors__config___enabled=1
DRUPAL_SERVICE_cors__config___allowedOrigins___0=http://www.example.com
Setting a cookie domain
DRUPAL_SERVICE_session__storage__options___cookie_domain=".example.com"
Contribute
- Reach out at #drunomics-contribute @ the Drupal Slack!
Ask your assistant about Services Environment Variable Parameters
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Services ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 8.x-1.4 | Stable | 8–11 | Oct 8, 2024 |