consolidating based on subdomains
This commit is contained in:
+45
-25
@@ -1,10 +1,25 @@
|
||||
# nginx.conf for a basic web server
|
||||
events {}
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
# TODO: route to proper location based on subdomain
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
listen 80;
|
||||
server_name flowy.live;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 443;
|
||||
server_name flowy.live;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
@@ -12,9 +27,23 @@ http {
|
||||
}
|
||||
}
|
||||
|
||||
# container registry
|
||||
server {
|
||||
listen 5000;
|
||||
listen 80;
|
||||
server_name registry.flowy.live;
|
||||
|
||||
location / {
|
||||
proxy_pass http://registry:5000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 443;
|
||||
server_name registry.flowy.live;
|
||||
|
||||
# TODO: add tls termination at nginx level
|
||||
|
||||
location / {
|
||||
proxy_pass http://registry:5000;
|
||||
@@ -25,9 +54,9 @@ http {
|
||||
}
|
||||
}
|
||||
|
||||
# rancher http
|
||||
server {
|
||||
listen 2000;
|
||||
listen 80;
|
||||
server_name rancher.flowy.live;
|
||||
|
||||
location / {
|
||||
proxy_pass http://rancher:80;
|
||||
@@ -37,32 +66,23 @@ http {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
# kubernetes cluster hello world
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:33360; # TODO: change to NodePort of helloworld within kubernetes
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stream {
|
||||
# rancher https: passthrough ssl
|
||||
server {
|
||||
listen 2001;
|
||||
listen 443;
|
||||
server_name rancher.flowy.live;
|
||||
|
||||
proxy_pass rancher:443;
|
||||
}
|
||||
|
||||
# kubernetes cluster api
|
||||
# k8s api: passthrough grpc/tcp
|
||||
server {
|
||||
listen 3080;
|
||||
proxy_pass localhost:33360; # TODO: change to NodePort of api within kubernetes
|
||||
listen 80;
|
||||
server_name api.flowy.live;
|
||||
|
||||
proxy_pass localhost:33606;
|
||||
}
|
||||
|
||||
# k8s audio relay
|
||||
|
||||
Reference in New Issue
Block a user