This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "unit.nginx.org/go" | |
| "os" | |
| "strconv" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [ "$EUID" -ne 0 ];then | |
| >&2 echo "This script requires root level access to run" | |
| exit 1 | |
| fi | |
| if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then | |
| >&2 echo "WORDPRESS_DB_PASSWORD must be set" | |
| >&2 echo "Here is a random one that you can paste:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proxy_cache_path /var/cache/nginx keys_zone=cache_zone:10m min_free=100M; | |
| server { | |
| #... | |
| location / { | |
| proxy_pass http://backend; | |
| proxy_cache cache_zone; | |
| proxy_cache_key $uri; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: bash | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: bash | |
| template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Builds NGINX from the QUIC+HTTP/3 development branch | |
| # - Based on the official NGINX docker image, including all modules built by default | |
| # - OpenSSL replaced with LibreSSL to support QUIC's TLS requirements (statically linked) | |
| # | |
| # docker build --no-cache -t nginx:quic . | |
| # docker run -d -p 443:443 -p 443:443/udp nginx:quic | |
| # | |
| # Note that a suitable configuration file and TLS certificates are required for testing! | |
| # See <https://quic.nginx.org/readme.html> for more info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8080; | |
| location /api { # Enable JSON status API | |
| write=on; | |
| } | |
| location = /dashboard.html { | |
| root /usr/share/nginx/html; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load_module modules/ngx_http_geoip2_module.so; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "action": { | |
| "share": "/www/data/static/", | |
| "chroot": "/www/data/" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: k8s.nginx.org/v1 | |
| kind: VirtualServer | |
| metadata: | |
| name: app-ingress | |
| spec: | |
| host: app.example.com | |
| tls: | |
| secret: app-secret-ecc | |
| upstreams: | |
| - name: web-server-payload |