Skip to main content

overview

Zango Project is basically our main project on which we can create, develop and host multiple apps under the same Infrastructure. Zango uses django-tenants package to isolate applications at the database level.

Think of it as your own private app ecosystem, where each application maintains its isolation while benefiting from shared resources and infrastructure

Pre-requisites

There are a few requisites that needs to be completed before you start creating a zango project. If you already have them configured, consider moving on to the next steps.

1. PostgreSQL Database Setup

Installing and setting up postgresql database manually can be overwhelming sometimes, if you have docker installed, you can set it up in just 3 commands as follows:
  1. Pull the Postgres Docker Image The first step is to pull the Postgres Docker image from the Docker Hub repository. This is done by running the following command:

    docker pull postgres
  2. Create a Docker Volume Next, we need to create a Docker volume to persist our Postgres data. This is done by running the following command:

    docker volume create postgres_data
  3. Run the Postgres Docker Container Now we can run the Postgres Docker container using the following command:

    docker run --name postgres_container -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 -v postgres_data:/var/lib/postgresql/data postgres

After the setup is complete, the values of DB configuration for .env would look something like:

POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432

2. Redis setup

Redis is used as a broker by celery workers. Use the steps below to run redis on your local machine:

Simply run the below command to start redis inside a docker container on port 6379.
docker run --name "name" -d -p 6379:6379 redis

For example:

docker run --name zango_redis -d -p 6379:6379 redis