docker-30: several new and forgotten config files relevant to services
running in docker
This commit is contained in:
46
docker-30/lab-proxy/nginx.conf
Normal file
46
docker-30/lab-proxy/nginx.conf
Normal file
@@ -0,0 +1,46 @@
|
||||
# nginx.conf
|
||||
|
||||
error_log /dev/stderr;
|
||||
|
||||
http {
|
||||
|
||||
server {
|
||||
listen 9080;
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.0.35:80;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
|
||||
log_format detailed '$remote_addr - [$time_local] '
|
||||
'"$request_method $host$request_uri" '
|
||||
'$status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /dev/stdout detailed;
|
||||
}
|
||||
|
||||
stream {
|
||||
# Stream doesn't log by default, enable explicitly:
|
||||
log_format stream_log '$remote_addr [$time_local] '
|
||||
'$protocol $ssl_preread_server_name '
|
||||
'$status $bytes_sent $bytes_received $session_time';
|
||||
|
||||
access_log /dev/stdout stream_log;
|
||||
|
||||
# Nginx ingress in kubernetes
|
||||
server {
|
||||
listen 9443;
|
||||
proxy_pass 192.168.0.35:443;
|
||||
}
|
||||
|
||||
# Gateway provided by cilium/envoy
|
||||
server {
|
||||
listen 9444;
|
||||
proxy_pass 192.168.0.36:443;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
events {}
|
||||
9
docker-30/lab-proxy/run.sh
Normal file
9
docker-30/lab-proxy/run.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
docker rm -f lab-proxy || /usr/bin/true
|
||||
|
||||
docker run -d --name lab-proxy \
|
||||
--restart unless-stopped \
|
||||
-v /srv/docker/lab-proxy/nginx.conf:/etc/nginx/nginx.conf:ro \
|
||||
-p 9443:9443 \
|
||||
-p 9444:9444 \
|
||||
-p 9080:9080 \
|
||||
nginx:alpine
|
||||
Reference in New Issue
Block a user