Skip to main content

Why is the .platform.app.yaml file separate from the .platform folder?

Comments

2 comments

  • Dan Milon

    Because in multi-app projects, there are multiple .platform.app.yaml files one for each app, and the convention is that the .platform.app.yaml file is placed on the top-level directory of the respective application.

    0
  • Larry

    The files in .platform control the environment at a cluster level. They define what services should be in the cluster.

    The .platform.app.yaml file defines the behavior of one single application container, with your custom code.

    You can have multiple applications in the same project, with their own code, but having multiple directories each with their own .platform.app.yaml file.

    Any directory that contains a .platform.app.yaml file becomes an application container, configured by that file. If there’s only one application then the degenerate case is to just make that the repository root, which is fine. To have multiple application containers, you would do something like:

    /
      .platform/
        routes.yaml
        services.yaml
      app1/
          .platform.app.yaml
      app2/
          .platform.app.yaml
    

    And then app and app2 would become entirely separate application containers with the code in those respective directories.

    0

Please sign in to leave a comment.