Valet-plus: Stub for Elasticsearch isn't copied to the nginx directory on fresh install

Created on 18 Aug 2019  路  4Comments  路  Source: weprovide/valet-plus

In #391 a problem came to light when you freshly install Valet+, the stub for Elasticsearch isn't copied to the nginx direction when Valet+ is installed for the first time.

Possibly introduced in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. If /usr/local/etc/nginx/valet/elasticsearch.conf does not yet exist, it won't allow it to create it either, causing this bug on a fresh installation.

Why I say fresh is because if you uninstall Valet+, it won't delete the /usr/local/etc/nginx/valet/elasticsearch.conf, so reinstalling it afterwards won't cause the same bug.

1.0.x

Most helpful comment

These commands worked for me:

sudo cp ~/.composer/vendor/weprovide/valet-plus/cli/stubs/elasticsearch.conf /usr/local/etc/nginx/valet/elasticsearch.conf
valet domain test

That automatically updated VALET_DOMAIN to the .test domain.

Question for you @Serializator : is the files->exists check necessary? It looks like that was very intentional in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. I was working on a PR to deal with that but I didn't want any unintended consequences of removing that check. If it's needed, maybe an argument to allow it to be created should be added.

All 4 comments

I can confirm this. Removing include valet/elasticsearch.conf; from my nginx config will solve this issue (for now)

Hi @MikeYV,

Thank you for thinking about quick fixes so that others can continue working while we're trying to solve the problem.

You can find the stub under ~/.composer/vendor/weprovide/valet-plus/cli/stubs/elasticsearch.conf. What you can do is copy this file over to /usr/local/etc/nginx/valet/elasticsearch.conf and replace VALET_DOMAIN with the domain you're using (default is .test).

These commands worked for me:

sudo cp ~/.composer/vendor/weprovide/valet-plus/cli/stubs/elasticsearch.conf /usr/local/etc/nginx/valet/elasticsearch.conf
valet domain test

That automatically updated VALET_DOMAIN to the .test domain.

Question for you @Serializator : is the files->exists check necessary? It looks like that was very intentional in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. I was working on a PR to deal with that but I didn't want any unintended consequences of removing that check. If it's needed, maybe an argument to allow it to be created should be added.

Dear Contributor,

With the release of Valet+ 2.0.0 the Valet+ development team and contributors have implemented the contribution guidelines. The contribution guidelines aim to improve the support and workflow of Valet+. For further information why this was implemented please check https://github.com/weprovide/valet-plus/issues/393.

We're closing this ticket because it does not follow the correct format. If you feel your ticket is still relevant we encourage you to re-open your ticket using the correct format.

Kind regards,
The Valet+ team

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zcuric picture zcuric  路  4Comments

ladetryne picture ladetryne  路  5Comments

Igloczek picture Igloczek  路  4Comments

eclectic-coding picture eclectic-coding  路  4Comments

dingo-d picture dingo-d  路  4Comments