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

Add --destination support to platform local build when passthru file does not exist #83

Closed
mikemilano opened this issue Jul 30, 2020 · 1 comment
Assignees

Comments

@mikemilano
Copy link

When using the Drupal 7 p.sh template (and potentially others), web.locations (in .platform.app.yaml) path to index.php does not exist. As a result, Lando cannot serve the site.

_www is the default destination created by platform build however using this adds other concerns in breaking with the definitions of web.locations.

Solution

  • On lando build, if web.locations./.passthru has a file defined, and that path does not exist, set the path as the --destionation value on platform local:build in psh-build.sh (line 35)
  • Add p.sh destination path support to .lando.yml
    • This will be an undocumented escape hatch to override anything we've set, or cover any case we haven't

Notes

  • p.sh config data in integrations/lando-platformsh/app.js -> app.platformsh
  • .platform.app.yaml is parsed and set in config.js -> parseApps
  • lib/run.js -> getDocRoot may work to identify the root path for 90%+ cases

If we go with passing as an argument

  • 'lib/services.jsis wherehelpers/psh-build.sh` is called
    • add --destination

If we go with env vars

  • Set it in types/platformsh-appserver/builder.js
@pirog
Copy link
Member

pirog commented Jul 30, 2020

@mikemilano long term we will eventually move to use /etc/platform/commands/build but i think that might be a post-beta activity so lets def do this for now.

pirog referenced this issue in lando/lando Jul 31, 2020
#2529: Use destination parameter if needed when doing platform build
@pirog pirog closed this as completed Jul 31, 2020
@rtfm-47 rtfm-47 transferred this issue from lando/lando Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants