Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Provide a new environment variable for http/https scheme #7214

@stasadev

Description

@stasadev

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem?

docker-compose.yml files can use DDEV_PRIMARY_URL like this (example from https://github.com/ddev/ddev-minio):

services:
  minio:
      MINIO_SERVER_URL: ${DDEV_PRIMARY_URL}:10101
      MINIO_BROWSER_REDIRECT_URL: ${DDEV_PRIMARY_URL}:9090

which won't work when using different router ports.

Extended variable expansion doesn't work with docker-compose, so we can't remove the port here.

Describe your solution

Introduce DDEV_SCHEME=https, and then use it like this:

services:
  minio:
      MINIO_SERVER_URL: ${DDEV_SCHEME}://${DDEV_PROJECT}.${DDEV_TLD}:10101
      MINIO_BROWSER_REDIRECT_URL: ${DDEV_SCHEME}://${DDEV_PROJECT}.${DDEV_TLD}:9090

Describe alternatives

Introduce DDEV_PRIMARY_URL_WITHOUT_PORT, but it's not flexible enough.

(Or we can add both variables for convenience.)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions