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

Bug: Craft Instructions on VVV produces directory issues #2703

Open
ubuntupunk opened this issue Feb 18, 2024 · 5 comments
Open

Bug: Craft Instructions on VVV produces directory issues #2703

ubuntupunk opened this issue Feb 18, 2024 · 5 comments
Labels

Comments

@ubuntupunk
Copy link

Are you using the latest stable or develop branch version of VVV?

Yes (develop)

Is it a new VVV, or an existing VVV that used to work?

New fresh install

Did you use a CustomFile?

No (default)

Whats the problem?

The nginx conf created by the craft provisioner produces:

server_name  craft.test;
    root         "/srv/www/craft/public_html/";

But this is needed to work:

server_name  craft.test;
    root         "/srv/www/craft/public_html/web";

Also the provisioner will attempt to reinstall via composer inside the craft directory if vagrant reload --provision is actioned. The result will be an error, and and absent nginx config.

How do we reproduce it?

install craft according to instruction here

What is the output of vagrant status

__ __ __ __
\ V\ V\ V / v3.12 Ruby:2.7.0, Path:"/media/afrodeity/Neptune/vagrant/vvv-local"
 \_/\_/\_/  git::stable(aee9a695)

Platform: linux-gnu shell:/bin/bash systemd  vagrant-hostsupdater vagrant-goodhosts CaseSensitiveFS shared_db_folder_disabled
Vagrant: v2.2.6, virtualbox: v6.1.50

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Which Operating System are you using?

Linux

Which provider are you using?

VirtualBox 7

Copy link

welcome bot commented Feb 18, 2024

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

VVV
Join the VVV Slack Workspace

@tomjn
Copy link
Member

tomjn commented Feb 18, 2024

Still reading this but some notes:

Vagrant: v2.2.6, virtualbox: v6.1.50

  • VirtualBox 6 is quite old, the latest version appears to be 7.0.14
  • Vagrant v2.4.1 is the newest version available, you have v2.2.6 installed
vagrant-hostsupdater vagrant-goodhosts

You only need goodhosts installed for VVV, hostsupdater was abandoned many years ago

The public_html directory is configurable, you can change it via the public_dir parameter e.g. something that looks like this public_dir: public_html/web.

you could add an nginx custom config in that provision folder but it's easier to do it via config.yml

@tomjn
Copy link
Member

tomjn commented Feb 18, 2024

@ubuntupunk I've made some tweaks to the CraftCMS and Drupal examples at Varying-Vagrant-Vagrants/varyingvagrantvagrants.org#217 can you confirm if these are good for you?

@ubuntupunk
Copy link
Author

ubuntupunk commented Feb 20, 2024 via email

@tomjn
Copy link
Member

tomjn commented Feb 20, 2024

The provisioner still needs some logic to check if there is already an installation in the dir when reprovisioning?

I don't know! The Drupal and Craft examples are speculative, nothing stops you using Drupal/Craft and you can install them manually but I thought composer create-project would be smart enough to see there's already something there and not try to mess things up, and that anybody trying to do that would be a developer who'd handle things once they're setup. My understanding of Drupal is that nobody just installs and configures it, they use it as a starting point for something bespoke, like Laravel but more put together.

Note that nothing in VVV is specifically written to support Craft other than the example in the page. The intention was to make it clear VVV isn't strictly for WordPress, and that you can manually install any PHP application, and via composer you can create projects. Hence the Craft and Drupal examples.

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

No branches or pull requests

2 participants