Git Product home page Git Product logo

Comments (8)

rfay avatar rfay commented on July 18, 2024

@lolautruche so in

relationships:
    database: "mysqldb:mysql"
    cache: "memcached:memcached"

the right-hand side of mysqldb:mysql or memcached:memcached is meaningless right? So all we care about, for example, with the database line here in .platform.app.yaml is the join value (mysqldb, which joins to the services .yaml stanza) and the right-hand side mysql is meaningless?

from ddev-platformsh.

rfay avatar rfay commented on July 18, 2024

Oh,

# 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>`.

But I guess I don't know what <endpoint name> means, can you enlighten me?

from ddev-platformsh.

rfay avatar rfay commented on July 18, 2024

Oh, the problem in this issue is not this, I don't think.

It's that I didn't remember that mysql:10.2 actually means mariadb:10.2.

from ddev-platformsh.

lolautruche avatar lolautruche commented on July 18, 2024

@rfay The doc states the following:

The endpoint_name is the exposed functionality of the service to use. For most services, the endpoint is the same as the service type. For some services (such as MariaDB and Solr), you can define additional explicit endpoints for multiple databases and cores in the service’s configuration.

So it's only relevant to a few services like MariaDB, which can define several endpoints (multiple databases).

from ddev-platformsh.

rfay avatar rfay commented on July 18, 2024

Ah, so "endpoint" means "name of database" then? So we probably need to not use the endpoint name often given here (in this example "mysql") and instead use (by default) the name of ddev's default database, "db", when creating PLATFORM_RELATIONSHIPS? Or of course, add logic which will create databases of the endpoint/database name provided. That's probably the most robust thing in the end. Perhaps a post-start hook could create the databases.

from ddev-platformsh.

lolautruche avatar lolautruche commented on July 18, 2024

It actually means more "name of the server".

from ddev-platformsh.

rfay avatar rfay commented on July 18, 2024

If it means "name of the server" then where would the name of the database be? Or is server name == db name in Platformsh-land?

from ddev-platformsh.

lolautruche avatar lolautruche commented on July 18, 2024

You would define this in the services.yaml (see the configuration for MariaDB/MySQL), on at the relationship level. By default, the DB name is main and referred as path in the $PLATFORM_RELATIONSHIPS JSON.

from ddev-platformsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.