-
Notifications
You must be signed in to change notification settings - Fork 82
Documented ibexa/cloud package #2985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mnocon
wants to merge
3
commits into
5.0
Choose a base branch
from
ibea-cloud
base: 5.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| --- | ||
|
Check warning on line 1 in docs/ibexa_cloud/environment_variables.md
|
||
| description: Environment variables automatically generated by Ibexa Cloud based on Platform.sh relationships and routes. | ||
|
Check failure on line 2 in docs/ibexa_cloud/environment_variables.md
|
||
mnocon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| # Environment variables on Ibexa Cloud | ||
|
|
||
| [[= product_name_cloud =]] automatically generates environment variables based on the Platform.sh relationships and routes configuration. | ||
| It parses `PLATFORM_RELATIONSHIPS` and `PLATFORM_ROUTES` environment variables and exposes them as application-specific variables. | ||
|
|
||
| Environment variable prefixes are created by converting relationship names to uppercase and replacing hyphens with underscores. | ||
| When multiple endpoints are defined for a single relationship, numerical indices are used, for example: `SOLR_1_`, `SOLR_2`. | ||
|
|
||
| ## Relationship naming conventions | ||
|
|
||
| Use the following relationship names in `.platform.app.yaml`: | ||
|
|
||
| - `database` - main application database | ||
| - `dfs_database` - DFS database (required name for DFS functionality) | ||
| - `rediscache` - Redis for cache | ||
| - `redissession` - Redis for sessions (recommended name for dedicated session storage) | ||
| - `elasticsearch` - Elasticsearch search service | ||
| - `solr` - Solr search service | ||
|
|
||
| ## Database variables | ||
|
|
||
| For MySQL and PostgreSQL databases, the following variables are generated based on the relationship name (e.g., `database`): | ||
|
|
||
| - `{RELATIONSHIP_NAME}_URL` - full database URL with charset and server version | ||
| - `{RELATIONSHIP_NAME}_USER` / `{RELATIONSHIP_NAME}_USERNAME` - database user | ||
| - `{RELATIONSHIP_NAME}_PASSWORD` - database password | ||
| - `{RELATIONSHIP_NAME}_HOST` - database host | ||
| - `{RELATIONSHIP_NAME}_PORT` - database port | ||
| - `{RELATIONSHIP_NAME}_NAME` / `{RELATIONSHIP_NAME}_DATABASE` - database name | ||
| - `{RELATIONSHIP_NAME}_DRIVER` - database driver | ||
| - `{RELATIONSHIP_NAME}_SERVER` - database server | ||
|
|
||
| For example, for a relationship called `database` the environment variables are named `DATABASE_URL`, `DATABASE_HOST`, `DATABASE_USER`, etc. | ||
|
|
||
| For more information about database configuration, see [Databases](databases.md). | ||
|
|
||
| ## DFS database variables | ||
|
|
||
| When using [distributed file storage (DFS) using a separate database](clustering.md#dfs-io-handler), you must use the relationship name `dfs_database`. | ||
| In addition to the database variables listed above, additional DFS-specific variables are created when `PLATFORMSH_DFS_NFS_PATH` is set: | ||
|
|
||
| - `DFS_NFS_PATH` - NFS path for DFS storage | ||
| - `DFS_DATABASE_CHARSET` - database character set | ||
| - `DFS_DATABASE_COLLATION` - database collation | ||
|
|
||
| ## Cache variables | ||
|
|
||
| For Redis and Memcached cache services, the following variables are available. | ||
|
|
||
| - `{RELATIONSHIP_NAME}_URL` (Redis only) | ||
| - `{RELATIONSHIP_NAME}_HOST` | ||
| - `{RELATIONSHIP_NAME}_PORT` | ||
| - `{RELATIONSHIP_NAME}_SCHEME` (Redis only) | ||
|
|
||
| In addition, the following global variables are defined: | ||
|
|
||
| - `CACHE_POOL` - either `cache.redis` or `cache.memcached` | ||
| - `CACHE_DSN` - cache connection string | ||
|
|
||
| !!! note | ||
| Redis services have higher priority than Memcached services when building the global cache variables. | ||
|
|
||
| For more information about persistence cache configuration, see [Persistence cache](persistence_cache.md). | ||
|
|
||
| ## Session variables | ||
|
|
||
| For Redis-based session storage, the following variables are available. | ||
|
|
||
| - `SESSION_HANDLER_ID` - session handler class name | ||
| - `SESSION_SAVE_PATH` - Redis connection in `host:port` format | ||
|
|
||
| The system looks for a relationship named `redissession` first. If not found, it uses the first available Redis service. | ||
|
|
||
| For more information about session configuration, see [Sessions](sessions.md). | ||
|
|
||
| ## Search engine variables | ||
|
|
||
| ### Solr | ||
|
|
||
| For Solr search engine configuration, the following variables are generated: | ||
|
|
||
| - `SEARCH_ENGINE` - set to `solr` | ||
| - `SOLR_DSN` - Solr connection string | ||
| - `SOLR_CORE` - Solr core name | ||
| - `{RELATIONSHIP_NAME}_HOST` | ||
| - `{RELATIONSHIP_NAME}_PORT` | ||
| - `{RELATIONSHIP_NAME}_NAME` / `{RELATIONSHIP_NAME}_DATABASE` | ||
|
|
||
| For more information, see [Solr search engine](solr_overview.md). | ||
|
|
||
| ### Elasticsearch | ||
|
|
||
| For Elasticsearch search engine configuration, the following variables are generated: | ||
|
|
||
| - `SEARCH_ENGINE` - set to `elasticsearch` | ||
| - `ELASTICSEARCH_DSN` - Elasticsearch connection string | ||
| - `{RELATIONSHIP_NAME}_URL` | ||
| - `{RELATIONSHIP_NAME}_HOST` | ||
| - `{RELATIONSHIP_NAME}_PORT` | ||
| - `{RELATIONSHIP_NAME}_SCHEME` | ||
|
|
||
| For more information, see [Elasticsearch](elasticsearch_overview.md). | ||
|
|
||
| ## HTTP cache variables (Varnish) | ||
|
|
||
| For Varnish-based HTTP caching, the following variables are available. | ||
|
|
||
| - `HTTPCACHE_PURGE_TYPE` - set to `varnish` | ||
| - `HTTPCACHE_PURGE_SERVER` - Varnish server address | ||
| - `HTTPCACHE_VARNISH_INVALIDATE_TOKEN` - token for cache invalidation | ||
|
|
||
| For more information about HTTP cache and Varnish configuration, see [HTTP cache](http_cache.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,7 +156,7 @@ Out of the box in `config/packages/cache_pool/cache.redis.yaml` you can find a d | |
|
|
||
| !!! note "[[= product_name_cloud =]]" | ||
|
|
||
| For [[= product_name_cloud =]]/Platform.sh: This is automatically configured in `vendor/ibexa/core/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php` if you have enabled Redis as `rediscache` Platform.sh service. | ||
| For [[= product_name_cloud =]]/Platform.sh, it's configured based on the `.platform.app.yaml` file by the [`ibexa/cloud` package](install_on_ibexa_cloud.md). | ||
|
|
||
| For anything else, you can enable it with environment variables. | ||
| For instance, if you set the following environment variables `export CACHE_POOL="cache.redis" CACHE_DSN="[email protected]:1234/13"`, it results in config like this: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.