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

Improve $PLATFORM_ROUTES to include at least route id and multiple routes, for #95, followup to #47 #103

Merged
merged 17 commits into from
Aug 25, 2023

Conversation

rfay
Copy link
Member

@rfay rfay commented Mar 12, 2023

This does not yet get magento2ce to completion. More work is required. I'll need help. I'm not sure the template is actually using $PLATFORM_ROUTES correctly, as it still tries to connect to redis.internal even when $PLATFORM_ROUTES is properly filled out.

@rfay rfay changed the title Improve $PLATFORM_ROUTES to include at least route id and multiple routes Improve $PLATFORM_ROUTES to include at least route id and multiple routes, for #95, followup to #47 Mar 12, 2023
@rfay rfay marked this pull request as draft March 12, 2023 02:20
@rfay
Copy link
Member Author

rfay commented Apr 17, 2023

To test this, ddev get https://github.com/rfay/ddev-platformsh/tarball/20230311_platform_routes

@rfay
Copy link
Member Author

rfay commented Aug 23, 2023

Current DDEV is OK with a non-existent routes.yaml

@rfay
Copy link
Member Author

rfay commented Aug 24, 2023

I think this is getting the routes right now!

@rfay rfay marked this pull request as ready for review August 24, 2023 22:23
@rfay rfay requested a review from gilzow August 25, 2023 00:50
@rfay
Copy link
Member Author

rfay commented Aug 25, 2023

@gilzow if you could take it for a spin,

ddev get https://github.com/rfay/ddev-platformsh/tarball/20230311_platform_routes

Mostly just validate the $PLATFORM_ROUTES that you find in the container, etc. ddev ssh and use the tools there to look at $PLATFORM_ROUTES

@gilzow
Copy link
Collaborator

gilzow commented Aug 25, 2023

woooooohhhhoooooo!!!!!!

.platform/routes.yaml

"https://{default}/":
  type: upstream
  id: iamtheid
  upstream: "cyberspace-place-ddev:http"

# A basic redirect definition
# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}":
  type: redirect
  to: "https://{default}/"

Inside the app?

gilzow@cyberspace-place-ddev-web:/var/www/html$ echo $PLATFORM_ROUTES | base64 --decode | jq '.'
{
  "https://cyberspace-place-ddev.ddev.site/": {
    "primary": true,
    "id": "iamtheid",
    "production_url": "<no value>",
    "attributes": {},
    "upstream": "cyberspace-place-ddev:http",
    "type": "upstream",
    "original_url": "<no value>"
  }
}

💪

@rfay rfay merged commit 85cc00d into ddev:main Aug 25, 2023
2 checks passed
@rfay rfay deleted the 20230311_platform_routes branch August 25, 2023 12:59
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.

2 participants