HTTP

HTTP

If your project has multiple applications, you can link them via relationships:

1
2
3
4
# .symfony.cloud.yaml
relationships:
    database: "securitydb:postgresql"
    some-service: "some-server:http"

Environment Variables

The configuration is exposed via the following environment variables (where SOME_SERVICE is the upper-cased version of the key defined in the relationship above):

  • SOME_SERVICE_URL: The full URL of the service
  • SOME_SERVICE_IP: The HTTP service IP
  • SOME_SERVICE_PORT: The HTTP service port
  • SOME_SERVICE_SCHEME: The HTTP service scheme
  • SOME_SERVICE_HOST: The HTTP service host

Note

Try connecting with curl $SOME_SERVICE_URL/.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.