consolidating based on subdomains
This commit is contained in:
+3
-8
@@ -7,15 +7,10 @@ services:
|
||||
restart: unless-stopped
|
||||
container_name: nginx-reverse-proxy
|
||||
ports:
|
||||
- 8080:8080 # hello world nginx docker container itself
|
||||
- 5000:5000 # container registry with tls within docker
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
||||
# rancher
|
||||
- 2000:2000
|
||||
- 2001:2001
|
||||
|
||||
- 80:80 # hello world in kubernetes cluster
|
||||
- 3080:3080 # api within kubernetes cluster
|
||||
# kubernetes
|
||||
- 6000:6000 # audio route
|
||||
- 6001:6001 # video route
|
||||
- 6002:6002 # presence route
|
||||
|
||||
+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