ddev / ddev-platformsh

Add integration with Platform.sh hosting service
Apache License 2.0
9 stars 10 forks source link

Service key in `$PLATFORM_RELATIONSHIPS` must match service name in `.platform.app.yaml` #57

Closed lolautruche closed 1 year ago

lolautruche commented 1 year ago

The current scripts that generate the JSON content for $PLATFORM_RELATIONSHIPS currently has an arbitrary fixed key (e.g., database for DB, essearch for Elastic Search, etc.

The value for this key must actually match the name of the relationship that is defined in .platform.app.yaml (example in Bigfoot app):

# .platform.app.yaml

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
    database: "mysqldb:mysql"
    cache: "memcached:memcached"

In the example above, the value to take into account is the relationship key (database, cache).

rfay commented 1 year ago

I'm glad you caught that. I was wondering about it, intending to return to it.