mirror of
https://git.nolog.cz/NoLog.cz/nginx-configurator.git
synced 2025-01-31 03:43:35 +01:00
update README
This commit is contained in:
parent
74b9eec122
commit
832838895c
1 changed files with 29 additions and 19 deletions
46
README.md
46
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Nginx cluster configurator - ncc
|
# Nginx cluster configurator - ncc
|
||||||
|
|
||||||
Manages the local nginx configuration and replicates changes to a backup.
|
Quality of life script for nginx and dehydrated.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -18,18 +18,30 @@ Manages the local nginx configuration and replicates changes to a backup.
|
||||||
* Create a guide how to use it to intrawiki
|
* Create a guide how to use it to intrawiki
|
||||||
* Teach everybody how to use it...
|
* Teach everybody how to use it...
|
||||||
|
|
||||||
# Build
|
|
||||||
|
|
||||||
Run `build.sh` on a linux(-ish) machine. The output is a tarball `ncc.tar`.
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
* Extract `ncc.tar` to a location on the server
|
* Install dependencies: nginx, keepalived (optional i guess), rsync, ssh, python3
|
||||||
* Copy configuration `config` to `/etc/ncc` and modify to suit your environment
|
* Install `ncc` through pip (or pipx) from this git repository
|
||||||
* Add `/etc/ncc/ncc-hook.sh` as a hook to your `dehydrated` installation
|
* Create a `ncc.yml` file (see `ncc.yml.sample`)
|
||||||
* Add `ncc` to your `PATH`
|
* Create a base nginx config (in `conf_dir`):
|
||||||
* Optionally add shell completion:
|
|
||||||
* Bash: `_NCC_COMPLETE=bash_source ncc > /etc/bash_completion.d/ncc && . /etc/bash_completion.d/ncc`
|
It should look like this:
|
||||||
|
```
|
||||||
|
conf/
|
||||||
|
nginx.conf
|
||||||
|
sites/
|
||||||
|
...
|
||||||
|
dehydrated/
|
||||||
|
dehydrated.sh <= you need to download dehydrated from github.com/dehydrated-io/dehydrated
|
||||||
|
config <= you don't have to configure anything, i recommend using AUTO_CLEANUP=yes
|
||||||
|
...
|
||||||
|
```
|
||||||
|
* Register to CA with dehydrated (`./dehydrated.sh --register --accept-terms`)
|
||||||
|
* Optional (for `new` command): Create a `templates` folder inside `conf_dir` and create some templates.
|
||||||
|
* Deploy once with a valid configuration (like a default http server that will
|
||||||
|
serve `/var/www/dehydrated`), so that dehydrated will be able to deploy
|
||||||
|
challenges.
|
||||||
|
* Done.
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
|
@ -41,16 +53,14 @@ Usage: ncc [OPTIONS] COMMAND [ARGS]...
|
||||||
MUST BE RAN ON MASTER (will detect automatically)
|
MUST BE RAN ON MASTER (will detect automatically)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--skip-master-check
|
|
||||||
--help Show this message and exit.
|
--help Show this message and exit.
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
autossl Renew SSL certificates and replicate changes
|
edit Edit a site
|
||||||
delete Delete a service
|
list List all sites and the files they are located in
|
||||||
edit Edit a service
|
new Create a new site
|
||||||
list List exsiting services and domain names associated with them
|
test Run nginx -t on the configuration
|
||||||
new Create a new service
|
up Deploy the configuration to the cluster
|
||||||
reload Replicate the local config and reload the nginx cluster
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Contributions
|
# Contributions
|
||||||
|
|
Loading…
Reference in a new issue