support screencasting to dynamically created service via nginx (k8s only thus far) add crawl /watch endpoint to enable watching, creates service if doesn't exist add crawl /running endpoint to check if crawl is running nginx auth check in place, but not yet enabled add k8s nginx.conf add missing chart files file reorg: move docker config to configs/ k8s: add readiness check for nginx and api containers for smoother reloading ensure service deleted along with job todo: update dockerman with screencast support
68 lines
1.9 KiB
Nginx Configuration File
68 lines
1.9 KiB
Nginx Configuration File
worker_processes 1;
|
|
error_log stderr;
|
|
pid /var/run/nginx.pid;
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
access_log /dev/stdout;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
include ./resolvers/resolvers.conf;
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
proxy_buffering off;
|
|
proxy_buffers 16 64k;
|
|
proxy_buffer_size 64k;
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
error_page 500 501 502 503 504 /50x.html;
|
|
merge_slashes off;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
location ~* /watch/([^/]+)/([^/]+)/ws {
|
|
set $archive $1;
|
|
set $crawl $2;
|
|
#auth_request /authcheck;
|
|
|
|
proxy_pass http://$2.crawlers.svc.cluster.local:9037/ws;
|
|
proxy_set_header Host "localhost";
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
}
|
|
|
|
location ~* /watch/([^/]+)/([^/]+)/ {
|
|
set $archive $1;
|
|
set $crawl $2;
|
|
#auth_request /authcheck;
|
|
|
|
proxy_pass http://$2.crawlers.svc.cluster.local:9037/;
|
|
proxy_set_header Host "localhost";
|
|
}
|
|
|
|
location = /authcheck {
|
|
internal;
|
|
proxy_pass http://localhost:8000/archives/$archive/crawls/$crawl;
|
|
proxy_pass_request_body off;
|
|
proxy_set_header Content-Length "";
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://localhost:8000/;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|
|
}
|
|
|