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

Usage Query #6

Closed
solace opened this issue Feb 22, 2019 · 3 comments
Closed

Usage Query #6

solace opened this issue Feb 22, 2019 · 3 comments

Comments

@solace
Copy link

@solace solace commented Feb 22, 2019

Hi,

The new local docker setup is pretty nifty, thanks! But I have a usage query.

With the old version, I was able to set up environments in each project's directory. But the new one groups them all into ~/wp-local-docker-sites. I understand there is the configure command, but that appears to set the global path but not on a per project basis.

What would be the recommended method of setting up environments in separate directories using v2?

Thanks

@cmmarslender

This comment has been minimized.

Copy link
Contributor

@cmmarslender cmmarslender commented Feb 22, 2019

Configure will allow you to change the directory that every site goes into, but in order to manage all the environments (run start, restart, wp-cli commands, etc) via the 10updocker helper command, we need to know where to find each site, which is why they all go by default into ~/wp-local-docker-sites. Even so, within whatever directory you configure, each site gets its own folder within that.

I actually run with a slightly different directory (~/Projects/) but all of my sites are still within the Projects folder, like this:

.
└── Projects
    ├── site1-test
    └── site2-test

For right now, allowing any arbitrary path for each environment is out of the scope of what we're trying to accomplish here, though its something we might be able to work into a future iteration.

If you're really looking to customize this and use your own directories, it is possible to manually manage environments and have them still flow through the main nginx gateway that this project provides, but you would lose the convenience helpers like 10updocker start or 10updocker wp... etc. If you take a look at one of the generated docker-compose.yml files, there are a few environment variables on the nginx container that define hostnames and a few other options. These environment variables are automatically parsed for all running docker containers by the gateway and will route correctly if you wanted to do more of a manual environment setup.

    environment:
      CERT_NAME: localhost
      HTTPS_METHOD: noredirect
      VIRTUAL_HOST: 'site1.test,*.site1.test'
@solace

This comment has been minimized.

Copy link
Author

@solace solace commented Feb 23, 2019

@cmmarslender Good to know, thanks, will take a look at that.

Out of interest, if I still wanted the convenience helpers, would it be problematic within this framework to keep it configured to ~/wp-local-docker-sites (or whatever) but symlink the individual projects within it to their respective project locations after creation?

And also, is there a timeframe for when v1 will be retired?

@cmmarslender

This comment has been minimized.

Copy link
Contributor

@cmmarslender cmmarslender commented Feb 28, 2019

I did a quick test with symlinks and at least the basic functionality seems to work. Not something we'd say is an official way of using this, but seems to work ok so far for me with something like this:

~/wp-local-docker-sites
└── symlink-test -> /Users/christophermarslender/symlink-test

We don't have a date quite yet for retiring V1, but we are currently not really adding any new functionality to that version and recommend people use v2 at this point.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.