bernardopires / django-tenant-schemas

Tenant support for Django using PostgreSQL schemas.
https://django-tenant-schemas.readthedocs.org/en/latest/
MIT License
1.46k stars 423 forks source link

Guides/examples on trying this locally for dev purpose. #448

Closed rajeshyogeshwar closed 7 years ago

rajeshyogeshwar commented 7 years ago

It took me almost a day to get this working with project scaffolded using cookiecutter django along with docker. It has been quite an experience. I followed tutorial and created client and then just realised "How am I going to develop an application that is multi-tenant on my development machine". It is something I quite literally missed.

How can it be done? I only seek direction.

alexandervaneck commented 7 years ago

Hi! This is indeed something we don't yet discuss in the docs...

I use dnsmasq to route all requests to tenant.my-domain.dev to 192.168.99.100.

rajeshyogeshwar commented 7 years ago

Fair enough. But still a hint or just a tip of how it can be set up locally can be a bit helpful to others, not to hide my inexperience in this regards. But, thanks anyway for the suggestion @AlexvEck .

alexandervaneck commented 7 years ago

Definitely agree on that ;) Hopefully this issue can server as an intermediate until the docs are updated.

goodtune commented 7 years ago

I add some names to my /etc/hosts file.

127.0.0.1 alpha.local
127.0.0.1 bravo.local
127.0.0.1 charlie.local
127.0.0.1 delta.local
127.0.0.1 echo.local
rajeshyogeshwar commented 7 years ago

@goodtune setting up /etc/hosts/ file yes it can be one way as well. I am looking forward to explore django-tenant-schemas and use it in one of my projects. Excited!