Closed goodtune closed 5 years ago
a sample:
python virtualenv directory in a different path from the project directory:
I have the following structure:
Virtualenvs:
/home/server_user/.virtualenvs/
├── venv1
│ ├── bin
│ │ └── python
│ ├── include
│ └── lib
└── venv2
├── bin
│ └── python
├── include
└── lib
django projects:
/home/server_user/projects/
├── project1
│ ├── logs
│ └── src
│ ├── apps
│ ├── config
│ │ └── wsgi.py
│ ├── .env
│ └── manage.py
└── project2
├── logs
└── src
├── apps
├── config
│ └── wsgi.py
├── .env
└── manage.py
unit:
{
"applications": {
"project1": {
"type": "python 2.7",
"user": "server_user",
"group": "server_user",
"processes": 8,
"working_directory": "/home/server_user/projects/project1/src/",
"path": "/home/server_user/projects/project1/src/",
"module": "config.wsgi",
"home": "/home/server/.virtualenvs/venv1"
},
"project2": {
"type": "python 3.5",
"user": "server_user",
"group": "server_user",
"processes": 8,
"working_directory": "/home/server_user/projects/project2/src/",
"path": "/home/server_user/projects/project2/src/",
"module": "config.wsgi",
"home": "/home/server/.virtualenvs/venv2"
},
},
"listeners": {
"*:8000": {
"application": "project1"
},
"*:9000": {
"application": "project2"
}
}
}
full context: https://github.com/nginx/unit/issues/151#issuecomment-405249583
Hello,
Thank you for your contribution!
Ref: https://www.nginx.com/blog/unit-0-3-beta-release-available-now/