fortrabbit / craft-copy

Deployment tools for Craft on fortrabbit
https://www.fortrabbit.com
MIT License
73 stars 8 forks source link

craft-copy using a different server root than app itself #150

Closed Maybach91 closed 1 year ago

Maybach91 commented 1 year ago

I have set the document root of the App to htdocs/web. To access craft and its assets the server has to point to the web folder, according to the craft documentation. So the setting WEB_ROOT_PATH=. works fine to access the app as well in my local environment.

But when i want to get the assets from the server to local via php craft copy/volumes/down production it tries to access the path htdocs/assets/... instead of htdocs/web/assets/.... Which leads to no pulling/rsync.

When craft-copy shows the following directory in the cli, its working ↓. (local env WEB_ROOT_PATH=web)

+------------+---------------------------+
| Volume     | blog                      |
+------------+---------------------------+
| Directory  | ./web/assets/blog/        |

If using the setting WEB_ROOT_PATH=. its not working ↓. But accessing the website and its assets is working.

+------------+---------------------------+
| Volume     | blog                      |
+------------+---------------------------+
| Directory  | ./assets/blog/            |

It feels wrong to change the env explicit for the craft-copy cli. And i was wondering if i’m doing something wrong. My fortrabbit config only contains the app, ssh_url, git_remote and before after commands.

ostark commented 1 year ago

Hi @Maybach91 - it's not forgotten, we are trying to reproduce it.

ostark commented 1 year ago

Hi @Maybach91,

IMO there is no need to set the WEB_ROOT_PATH at all. You may define the @webroot alias https://help.fortrabbit.com/craft-tune#toc-domain-setup

Maybach91 commented 1 year ago

Hi @Maybach91,

IMO there is no need to set the WEB_ROOT_PATH at all. You may define the @webroot alias help.fortrabbit.com/craft-tune#toc-domain-setup

Thanks for the hint @ostark . I’m already using in my config. Or is this something different from that, what you are suggesting? 🤔

frank-laemmer commented 1 year ago

We don't understand your problem still. Can you elaborate?

frank-laemmer commented 1 year ago

Closing after no reply. Sorry not actionable.