tjgurwara99 / multi-tenant-django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SETUP

  1. Run docker build . -t taj/multi-client - the taj/multi-client is a tag for the docker container that we create.
  2. Use docker compose to run our apps in isolated environments by running the command
docker-compose up -d

-d would run a daemon process.

  1. This is the most annoying part unfortunately - you will have to modify your local /etc/hosts file to test this locally

I had to add the following to my /etc/hosts

...
127.0.0.1       client1.polls.local
127.0.0.1       client2.polls.local
...

This gives us the ability to access nginx-proxy inside the dockers - not sure how this works in terms of networking.

NOTE: I'm quite rusty when it comes to nginx so there might be a better way to do this and not have to worry about this part.

About


Languages

Language:Python 61.3%Language:Shell 37.7%Language:Dockerfile 1.0%