Skip to main content
Version: 2.x

Deploy

The deploy folder which is a submodule which is maintained in this repository data-viz-deploy contains deployment scripts. This includes Jenkins, Nginx, docker-compose files.

Deploy

Nginx​

We use nginx to route and create proxies to urls in our internal services. There are 4 nginx.conf files which should be in sync with each other always. They are found here:

custom
├── deploy
│ ├── nginx.conf
deploy
├── nginx
│ ├── nginx.conf
│ ├── nginx_dev.conf
│ ├── tcdi.conf

An example or a proxy we create using nginx is when we route our API Gateway container which sends request to any of our registerd services.

In this reverse proxy, we route http://zuul:8762/ to http://localhost/api

location /api/ {
# Preflighted requests
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
gunzip on;
client_max_body_size 30M;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Prefix /api;
proxy_pass http://gateway:8762/;
}