platformsh-templates / laravel

Laravel template for Platform.sh.
23 stars 98 forks source link

Mount warnings #58

Open danharper83 opened 7 months ago

danharper83 commented 7 months ago

Describe the bug

When I create a project from this template every time I commit new changes and push I get the the following warnings

Include some logs

  W: The mount '/app/storage/framework/views' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

  W: The mount '/app/storage/framework/cache' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

  W: The mount '/app/storage/logs' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

  W: The mount '/app/storage/app/public' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

  W: The mount '/app/bootstrap/cache' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

  W: The mount '/app/storage/framework/sessions' has a path that overlaps with a non-empty folder.
  The content of the non-empty folder either comes from:
   - your git repository (you may have accidentally committed files).
   - or from the build hook.
  Please be aware that this content will not be accessible at runtime.

Reproducing

Create a project from this template.

Expected behavior

No warnrings?

Your environment

Development

Screenshots

No response

Additional context

No response

gilzow commented 7 months ago

These are expected and related to the fourth bullet point in the Customizations section of the README. That said, I do wonder if we might need to call it out more directly. 🤔

Specifically, what is happening is that these locations in the repo are placeholders (which is why they contain a .gitignore), for when the mounts are attached after the build stage.

The warning is indicating that if you have content in these locations in your repo, that content will be unavailable once the mount has been attached.

Did you start your project from the platform.sh console and select laravel from the list of templates? or did you start by clicking the "Deploy on Platform.sh" button in the README? I'm trying to think of how we can more efficiently surface the relevant information to a user.

gilzow commented 7 months ago

Docs page on the message: https://docs.platform.sh/create-apps/troubleshoot-mounts.html

danharper83 commented 7 months ago

Ahh ok, well I initially added the config from this demo app into my own and assumed I had potentially made a mistake. So I tested with a blank laravel project in the Platform.sh UI.

I guess the warning message is fine in the deployment now I understand that it's ok to have the warning.