106 lines
2.4 KiB
Nginx Configuration File
106 lines
2.4 KiB
Nginx Configuration File
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 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;
|
|
index index.html;
|
|
}
|
|
}
|
|
|
|
server {
|
|
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;
|
|
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 80;
|
|
server_name rancher.flowy.live;
|
|
|
|
location / {
|
|
proxy_pass http://rancher:80;
|
|
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 443;
|
|
server_name rancher.flowy.live;
|
|
|
|
proxy_pass rancher:443;
|
|
}
|
|
|
|
# k8s api: passthrough grpc/tcp
|
|
server {
|
|
listen 80;
|
|
server_name api.flowy.live;
|
|
|
|
proxy_pass localhost:33606;
|
|
}
|
|
|
|
# k8s audio relay
|
|
server {
|
|
listen 6000 udp;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
|
|
}
|
|
|
|
# k8s video relay
|
|
server {
|
|
listen 6001 udp;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
|
|
}
|
|
|
|
# k8s presence heartbeat
|
|
server {
|
|
listen 6002;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of tcp presence deployment service
|
|
}
|
|
}
|