Add README.md
This commit is contained in:
54
README.md
Normal file
54
README.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Novicelab Nginx
|
||||||
|
Nginx + Certbot + GoAccess
|
||||||
|
|
||||||
|
## Logs
|
||||||
|
All logs stored in `data/logs` site files
|
||||||
|
|
||||||
|
## Site confs
|
||||||
|
Located in `data/conf.d`
|
||||||
|
|
||||||
|
## Container variables
|
||||||
|
Harbor and Opencloud site confs use host IP; they have expansive configs with their own Docker networks. \
|
||||||
|
|
||||||
|
All other site confs use a backend variable that points to the contioner as such:
|
||||||
|
```
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
resolver 127.0.0.11 8.8.8.8 8.8.4.4 valid=300s;
|
||||||
|
resolver_timeout 5s;
|
||||||
|
|
||||||
|
set $adminer_backend adminer:8080;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
## Advantage: Nginx container start won't be blocked should the
|
||||||
|
## below services container be down
|
||||||
|
## Upstream works just as well
|
||||||
|
proxy_pass http://$adminer_backend;
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Upstream structure
|
||||||
|
```
|
||||||
|
http {
|
||||||
|
upstream goaccess {
|
||||||
|
server goaccess:7890 weight=1 fail_timeout=30s;
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
|
||||||
|
location /ws {
|
||||||
|
proxy_pass http://goaccess;
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir nginx && cd nginx
|
||||||
|
git clone https://gitea.novicelab.io/novicelab.io/nginx.git .
|
||||||
|
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user