Skip to content

Instantly share code, notes, and snippets.

@ecstasy2
Last active September 7, 2016 17:40
Show Gist options
  • Save ecstasy2/b03381ca42d1df394decb14582cd8726 to your computer and use it in GitHub Desktop.
Save ecstasy2/b03381ca42d1df394decb14582cd8726 to your computer and use it in GitHub Desktop.
Nginx configuration to proxy all edyn micro services
resolver 169.254.169.250;
server {
listen 80 default_server;
return 200 'Ok!';
add_header Content-Type text/plain;
}
server {
listen 80;
server_name graphql.${STACK}.edyn.com;
set $upstream_endpoint "http://graphql-gateway:80";
location / {
proxy_pass $upstream_endpoint;
include /etc/nginx/proxy_params;
}
}
server {
listen 80;
server_name api.identity.${STACK}.edyn.com;
set $upstream_endpoint "http://identity-api:80";
location / {
proxy_pass $upstream_endpoint;
include /etc/nginx/proxy_params;
}
}
server {
listen 80;
server_name api.sensor.${STACK}.edyn.com;
set $upstream_endpoint "http://sensor-api:80";
location / {
proxy_pass $upstream_endpoint;
include /etc/nginx/proxy_params;
}
}
server {
listen 80;
server_name api.valve.${STACK}.edyn.com;
set $upstream_endpoint "http://valve-api:80";
location / {
proxy_pass $upstream_endpoint;
include /etc/nginx/proxy_params;
}
}
server {
listen 80;
server_name rabbitmq.${STACK}.edyn.com;
set $upstream_endpoint "http://rabbitmq:15672";
location / {
proxy_pass $upstream_endpoint;
include /etc/nginx/proxy_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment