Skip to content

Multiple Django Applications #558

Closed
Closed
@Alterak

Description

@Alterak

For one Django site, I use the default setting, which is written in instructions.

{
    "listeners": {
        "*:80": {
            "pass": "routes"
        }
    },

    "routes": [
        {
            "match": {
                "uri": "/static/*"
            },

            "action": {
                "share": "/path/to/app/"
            }
        },
        {
            "action": {
                "pass": "applications/django"
            }
        }
    ],

    "applications": {
        "django": {
            "type": "python 3.X",
            "path": "/path/to/app/",
            "home": "/path/to/venv/",
            "module": "project.wsgi",
            "environment": {
                "DJANGO_SETTINGS_MODULE": "project.settings",
                "DB_ENGINE": "django.db.backends.postgresql",
                "DB_NAME": "project",
                "DB_HOST": "127.0.0.1",
                "DB_PORT": "5432"
            }
        }
    }
}

What if I want to use multiple Django sites? Help me write the configuration for the second site correctly!
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    z-documentation-update-neededThis type of issues likely have a link to an issue in the Unit Docs repo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions