deploy/nginx.proxy.staging.conf
user nobody nogroup;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
upstream unbrake_frontend {
server frontend:80;
}
server {
server_name unbrake-hom.ml www.unbrake-hom.ml frontend.unbrake-hom.ml www.frontend.unbrake-hom.ml;
listen 80;
location / {
proxy_pass http://unbrake_frontend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
upstream unbrake_api {
server api-server:80;
}
server {
listen 80;
server_name api.unbrake-hom.ml www.api.unbrake-hom.ml;
location / {
proxy_pass http://unbrake_api/graphql;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /mqtt-reading-key {
proxy_pass http://unbrake_api/graphql/mqtt-reading-key;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}