Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported Platform.sh provided environmental vars, fixes #82 #83

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

gilzow
Copy link
Collaborator

@gilzow gilzow commented Dec 13, 2022

Closes #82
Adds a list of Platform-provided environmental variables that are currently supported in DDEV.

List of variables that are "missing" or not yet implemented:

  • PLATFORM_APPLICATION
  • PLATFORM_BRANCH
  • PLATFORM_DOCUMENT_ROOT
  • PLATFORM_ENVIRONMENT_TYPE
  • PLATFORM_OUTPUT_DIR
  • PLATFORM_SMTP_HOST
  • PLATFORM_SOURCE_DIR
  • PORT - not always available
  • SOCKET

There are two PLATFORM_* environmental variables in DDEV that do not map to ones we provide.

  • PLATFORM_DIR - is this possibly supposed to be PLATFORM_DOCUMENT_ROOT that is "missing"?
  • PLATFORM_MOUNTS

Closes ddev#82 
Adds a list of Platform-provided environmental variables that are supported
@rfay rfay changed the title Supported Platform.sh provided environmental vars Supported Platform.sh provided environmental vars, fixes #82 Dec 16, 2022
@rfay
Copy link
Member

rfay commented Dec 16, 2022

@gilzow

  • if PLATFORM_DIR is not an appropriate thing, it should be removed. I don't see any usages of it.
  • If PLATFORM_MOUNTS is not used by platform, it should be removed. It's not used by code in this add-on, so it must be a redirection of some type.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems right. If we want to also remove the orphaned env vars you point out that is also reasonable, if we're sure they're not used by Platform.sh

@gilzow
Copy link
Collaborator Author

gilzow commented Dec 19, 2022

@rfay I sent you a direct message, re: PLATFORM_DIR

I've never seen PLATFORM_MOUNTS and it isn't in the docs. I've always accessed mount information via
$ echo $PLATFORM_APPLICATION | base64 --decode | jq -r '.mounts'

Looks like it was added here?

I guess we could rename it to DDEV_PLATFORM_MOUNTS just to designate that it's a DDEV env var related to PLATFORM, vs an "official" PLATFORM_* env var?

@rfay rfay merged commit 749279e into ddev:main Dec 20, 2022
@rfay
Copy link
Member

rfay commented Dec 20, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Document which Platform.sh Environmental Variables are/aren't available
2 participants