Skip to content

Instantly share code, notes, and snippets.

@mtlynch
Last active April 5, 2021 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtlynch/ddc9171481ae777ef467c8df9e2677b8 to your computer and use it in GitHub Desktop.
Save mtlynch/ddc9171481ae777ef467c8df9e2677b8 to your computer and use it in GitHub Desktop.
FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
RUN cat /etc/resolv.conf
app = "nginx-scratch"
kill_signal = "SIGINT"
kill_timeout = 5
[experimental]
private_network=true
[[services]]
internal_port = 8085
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
[[services.ports]]
handlers = ["http"]
port = "80"
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
port = "8085"
restart_limit = 6
timeout = "2s"
events {
worker_connections 1024;
multi_accept off;
}
http {
server {
listen 8085 default_server;
proxy_buffers 16 16k;
proxy_buffer_size 16k;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
location / {
resolver [fdaa::3]:53 valid=30s;
set $upstream_service tinypilot._peer.internal;
proxy_pass http://$upstream_service:80;
proxy_set_header Host $http_host;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment