Skip to main content

Installing Zango with Docker

Prerequisites

To begin using Zango through Docker installation, ensure that Docker and Docker Compose are installed on your machine. If not, follow the installation instructions for Docker and Docker Compose.

Steps

  1. Clone the Zango repository:

    git clone https://github.com/Healthlane-Technologies/zango.git
    cd zango
  2. Run the following command from the root folder of the project:

    python setup_project.py --project_dir <directory>

    You can use the --build_core option to build the Zango library

  3. This creates a project named zango_project in the zproject folder in the specified directory.

  4. Customize the project creation using optional arguments:

    python setup_project.py --project_name my_project --project_dir /path/to/my_project --build_core --platform_username user@example.com --platform_user_password secret --skip_build_project
    • --project_name: Modifies the name of the project (Default: zango_project).
    • --project_dir: Specifies the directory for project creation (Default: zproject).
    • --build_core: Builds the Zango library (Default: False).
    • --platform_username: The user email of the platform user (Default: platform_admin@zango.dev).
    • --platform_user_password: The password for the platform user (Default: Zango@123).
  5. Navigate to project_dir to start the project.

  6. Docker is started as a non root user, run the below commands to export the host HOST_UID and HOST_GID

export HOST_UID=$(id -u)
export HOST_GID=$(id -g)
  1. Run docker compose up in the project directory to start the project

Rebuilding Core

If you modify somehting in the core of the project, to rebuild it run the following command from the root of the zango project

python setup_project.py --project_dir <project_dir> --rebuild_core

Syncing Static Files And Running Migrations

You can sync static files by running python manage.py collectstatic from the project directory in the <project>-app-1 container. Make sure to sync the static files before deploying

You can run migrations by running python manage.py ws_makemigrations <project_name> and python manage.py ws_migrate <project_name from the project directory in the container