careful-dress-39510
03/17/2022, 4:00 AMaverage-beach-28850
03/17/2022, 4:39 AMcareful-dress-39510
03/17/2022, 4:42 AMcareful-dress-39510
03/17/2022, 4:53 AMcareful-dress-39510
03/17/2022, 4:54 AMaverage-beach-28850
03/17/2022, 4:58 AMcareful-dress-39510
03/17/2022, 5:12 AMaverage-beach-28850
03/17/2022, 5:17 AMquiet-motherboard-43023
03/17/2022, 9:29 AMMETAFLOW_SERVICE_AUTH_KEY
so we have that set on the client side and added a nginx on top of the metaflow service container
basically the CMD for the docker file (it's just a small modification on top of netflixoss/metaflow_metadata_service
) looks like
#!/usr/bin/env bash
set -eux
envsubst < /etc/nginx/conf.d/metaflow.conf.template | sed -e 's/§/$/g' > /etc/nginx/conf.d/metaflow.conf
/etc/init.d/nginx start
/opt/latest/bin/python -m services.metadata_service.server
and the nginx template
map §http_x_api_key §is_ok {
default "0";
${AUTH_KEY} "1";
}
server {
listen ${NGINX_PORT};
server_name localhost;
location /ping {
proxy_bind 127.0.0.1;
proxy_pass <http://localhost:8080/ping>;
proxy_set_header Host "localhost";
}
location / {
if (§is_ok !~* "1") {
return 405;
}
proxy_bind 127.0.0.1;
proxy_pass <http://localhost:8080/>;
proxy_set_header Host "localhost";
}
}