Commit 0c623582 authored by Federico Sismondi's avatar Federico Sismondi

Add() DCA fountain server as nginx upstream component. Updated NGINX and...

Add() DCA fountain server as nginx upstream component. Updated NGINX and docker compose to use nginx. Add() basic auth to access DCA fountain but at nginx level
parent 0cfb4d15
......@@ -33,7 +33,8 @@ services:
- ${PWD}/nginx/cache/:/var/www/nginx/cache/
- ${PWD}/nginx/logs/:/var/log/nginx/:rw
- ${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf:rw
#- /etc/letsencrypt/:/etc/letsencrypt/
- ${PWD}/nginx/htpasswd/:/etc/nginx/htpasswd/:rw
#- /etc/letsencrypt/:/etc/letsencrypt/
ports:
- 80:80
- 443:443
......@@ -361,7 +362,7 @@ services:
- ./dca-carouge-fountain:/code
networks:
default:
ipv4_address: 172.18.1.14
ipv4_address: 172.18.1.16
healthcheck:
test: curl --fail -s http://dca-carouge-fountain/healthcheck || exit 1
start_period: 30s
......
......@@ -19,3 +19,7 @@ upstream IDM {
upstream DCA-CAROUGE-WATERING {
server dca-carouge-watering:80;
}
upstream DCA-CAROUGE-FOUNTAIN {
server dca-carouge-fountain:80;
}
create with htpasswd the user credentials
```
docker exec -it nginx apt install -y apache2-utils
docker exec -it nginx htpasswd /etc/nginx/htpasswd/.htpasswd carouge_naiades
<type password>
```
......@@ -36,11 +36,12 @@ http {
location ^~ /context-api/ {
include conf.d/proxy_params.conf;
proxy_pass http://ORION/; # see cond.d/upstream
# proxy_pass http://ORION_PEP/; # see cond.d/upstreams
# proxy_pass http://ORION_PEP/; # DEVELOPMENT ONLY!
proxy_redirect default;
}
location ^~ /time-series-api/ {
# DEVELOPMENT ONLY! auth is needed here!
include conf.d/proxy_params.conf;
proxy_pass http://QUANTUM/; # see cond.d/upstreams
proxy_redirect default;
......@@ -57,6 +58,17 @@ http {
proxy_pass http://DCA-CAROUGE-WATERING/dca-carouge-watering-sensed-data; # see cond.d/upstreams
proxy_redirect default;
}
location ^~ /dca-carouge-fountain-sensed-data {
auth_basic "Restricted Area!";
auth_basic_user_file htpasswd/.htpasswd;
include conf.d/proxy_params.conf;
proxy_pass http://DCA-CAROUGE-FOUNTAIN/dca-carouge-fountain-sensed-data; # see cond.d/upstreams
proxy_redirect default;
}
}
# listen 80;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment