Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Questions to clarify how to best use wp-local-docker-v2 in a team #322

Open
2 tasks done
FabianKielmann opened this issue Nov 29, 2022 · 1 comment
Open
2 tasks done
Labels
question Further information is requested

Comments

@FabianKielmann
Copy link

Troubleshooting

  • I have attempted to troubleshoot this already

Describe your question

I'm getting started with a new team of web devs developing themes and pugins for WordPress and I'd like to build a workflow with wp-local-docker-v2 for this team.

So the first question I have is: What to share in a (private) repository? Do I share the project folder "site-test" including .config.json, docker compose file, config folder, etc. or does everyone set up wp-local-docker-v2 themselves and we only share the project-folder (e.g. the theme-folder or plugin-folder we're developing in)? Sharing the complete site-test folder would require us to exclude the installed wordpress folder, but that may include our theme that we develop.

For sharing database and stuff I'm going to check out wp snapshots, but for now we want to find a good way to share all our work conveniently.

Btw, we develop themes using npm packages, composer packages etc, so in that theme folder for example we would also have configuration for linting, coding standards, etc. Would that be a good way?

Just overall i'm a bit confused about how to set things up. I believe wp-local-docker-v2 can make a huge difference when applyed correctly and I just seek experiences from other people or a bit of guidance on how to set those things up for a team.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@FabianKielmann FabianKielmann added the question Further information is requested label Nov 29, 2022
@Spoygg
Copy link

Spoygg commented Dec 1, 2022

Hey Fabian!

What you share depends on your use case. From what you described it seems that best would be to only share specific theme or plugin in a repository, especially if each plugin/theme project has its own set up for linting, build, etc.

General development workflow would be to set up a document (or add that info in the project readme file) for each project that would describe on how to set up the local environment and how to clone the project repository to a proper place.

Local environment setup document would look something like this:

  1. create wp-local-docker site (with answers for each prompt during the site creation via 10updocker create) that way all local setups would use the same domain, WP version, PHP version etc.
  2. next describe in the doc how to use wpsnapshots to share the db, if needed
  3. next would be instructions on how to clone plugin/theme project into wp-content/...
  4. any manual set up steps
  5. troubleshooting info

You could use one local-docker site to manage all your projects, it really depends on your use case, if you need a separate site for each plugin/theme project then do what's best for you.

There is no point in sharing root of wp-local-docker site in this case. It is a common practice for every developer to create their local environment from scratch and then just replace or import specific directories. Sometimes it makes sense to share the whole wp-content directory and sometimes just a specific theme/plugin directory. Later would work best in your case.

All local environments would be identical if created from scratch, there is no need to share all that in a repository.

I hope that helps a bit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants