NGINX QUICKDEPLOY
About
Helps you create and deploy websites on nginx quickly.
Installation
pip3 install nginx-quickdeploy
Usage
Variables:
- 'FQDN' : Fully Qualified Domain Name, name of your website
- Nginx config path: Path where your generated config file is stored.
- Ports: Ports to listen to, in format:
<port1> [ssl], <port2> [ssl] - Root path: Path where your html files are located
- Proxy: If your actual application is running on some other port, you can proxy pass and use nginx as webserver. For that just use this function, if not leave it empty
- Hook : Post deployment shell script you want to be run
CLI
-h, --help Show this help message and exit
-i [INPUT], --input [INPUT] Input json file for easy installation
-d [DOMAIN], --domain [DOMAIN] Domain you want to set up.
-p [PATH], --path [PATH] Config file path
--ports [PORTS] Ports to listen to separated by comma(,)
-w [WEBROOT], --webroot [WEBROOT] Webroot folder containing index.html
-f [FORWARD], --forward [FORWARD] Proxy pass URL
--ssl_cert_path [SSL_CERT_PATH] SSL certificate path
--ssl_key_path [SSL_KEY_PATH] SSL key path
--hook Post install hook, a shell script you want to launch after
deployment is complete.
JSON input:
Json input is also supported for easier deployment. Following keys are supported:
- url : mandatory : provide FQDN
- path : optional : provide path to be written config, default /etc/nginx/sites-available/{URL}
- ports : optional, list : provide ports to listen and with ssl or not, default 80 on both interfaces
- root : optional : path to webroot folder, default /var/www/html/{url}
- proxy : optional : path to http proxy if you have an app running behind nginx
- ssl_cert_path : optional : SSL cert path if you have ssl enabled
- ssl_key_path : optional : SSL key path if you have ssl enabled
Json example
{
"url": "www.example.org",
"path": "/usr/shared/www.example.org",
"ports": ["80", "[::]:80", "443 ssl", "[::]:443 ssl"],
"root": "/var/www/html",
"proxy": "https://app.example.org:8080",
"ssl_cert_path": "/etc/ssl/myexample.org/cert.crt",
"ssl_key_path": "/etc/ssl/myexample.org/key.pem"
}
yields:
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name www.example.org;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/myexample.org/cert.crt;
ssl_certificate_key /etc/ssl/myexample.org/key.pem;
location / {
proxy_pass https://app.example.org:8080;
}
}
Tips and Examples
Invoke the script with sudo rights if you want to write to /etc/ngnix/sites-available as it is write protected for non sudo users.
# sudo quickdeploy
FQDN of your domain, e.g. example.com or subdomain.example.com without http or https: www.example.org
Where should the new config file be saved?, default is /etc/nginx/sites-available/www.example.org :
Ports separated by commas(,) in nginx fashion, like 80, [::]:80 etc
For ssl, just add ssl after the port, e.g. 80, 443 ssl, [::]:80, [::]:443 ssl
Enter ports here:
Enter the www root path(default /var/www/html):
Should this server need to proxy_pass, enter the address here:
Your new website was deployed successfully
Restart nginx to serve it via nginx.
would yield a config file that looks like this:
server {
root /var/www/html;
server_name www.example.org;
listen 80;
location / {
try_files $uri $uri/;
}
}
Metadata
Release files for nginx-quickdeploy 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nginx_quickdeploy-0.4.2.tar.gz | 9.6 kB | Without provenance | Details for nginx_quickdeploy-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nginx_quickdeploy-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for nginx_quickdeploy-0.4.2-py3-none-any.whl |
Total release size: 19.8 kB
Release files / nginx_quickdeploy-0.4.2.tar.gz
| Download URL | nginx_quickdeploy-0.4.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48ef7f51a63a3fb03ef1fffab661685240e9986ef365757e3837795c210dfa3a
|
|
BLAKE2b-256 checksum How to use checksums |
526df8aee309e74724eb0ad0068db176c090e390ae2b60c2215ee8da788d4514
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Release files / nginx_quickdeploy-0.4.2-py3-none-any.whl
| Download URL | nginx_quickdeploy-0.4.2-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f902d0a26fc5c6db3daaeb009f90c195e8daea890ff59351ebba2e25cc9b8e4
|
|
BLAKE2b-256 checksum How to use checksums |
f9c19c927de8e28ba552600e7d49e7ce0a7d72b3fac8279e453ae3b28ed23db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Security for nginx-quickdeploy 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.