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

Automate configuration of multi store projects #696

Open
TerrorSquad opened this issue Apr 26, 2022 · 0 comments · May be fixed by #697
Open

Automate configuration of multi store projects #696

TerrorSquad opened this issue Apr 26, 2022 · 0 comments · May be fixed by #697

Comments

@TerrorSquad
Copy link

Hi everyone,

I've noticed that we don't have scripts that will automate configuring store access for existing multistore projects.
It would be nice to have a script such as bin/setup-domain-multistore.
The idea behind such as script is to run it after the database has been imported and composer install has been run.

It should do the following things:

  • update docker-compose.yml and add bind mounts to nginx.conf and default.conf files
    • I'd add these as bind mounts since doing it that way would allow us to edit the files easily from the outside without the need for an image rebuild. Update the file, restart container and you're done.
  • prepend a mapping directive to default.conf file where each store is accessible at magento-store-code.test (this is the simplified approach from the documentation
    • store-code should be fetched from the store table and converted to kebab case
  • update base URLs for each store
  • set cookie path and cookie domain config values for each store
  • update /etc/hosts and add a domain for each store

This could be extremely useful for existing projects that have many stores (10+). It would allow for faster setup which would lead to less time spent setting up the project, which is a win for all team members. Also, if for some reason, your local environment gets corrupted or is deleted, you could just run the script instead of doing all these steps manually.

@TerrorSquad TerrorSquad linked a pull request Apr 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant