Skip to content

Commit

Permalink
[apicast] automatically forward env variables
Browse files Browse the repository at this point in the history
all variables starting with APICAST_ or THREESCALE_
will be forwarded to the nginx processes
  • Loading branch information
mikz committed Mar 13, 2017
1 parent a296129 commit edc518b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions apicast/bin/apicast
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ done

main+=("daemon ${daemon};")
main+=("worker_processes ${worker_processes};")
main+=(`printenv | awk '$1 ~ /^(APICAST|THREESCALE)_/ {split($0,env,"="); print "env", env[1] ";"}'`)

function join_by { local IFS="$1"; shift; echo "$*"; }
args=$(join_by '' "${args[@]}")
Expand Down
13 changes: 0 additions & 13 deletions apicast/conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
env THREESCALE_DEPLOYMENT_ENV;
env THREESCALE_PORTAL_ENDPOINT;
env THREESCALE_CONFIG_FILE;
env APICAST_CUSTOM_CONFIG;
env APICAST_PATH_ROUTING_ENABLED;
env APICAST_SERVICES;
env REDIS_HOST;
env REDIS_PORT;
env RESOLVER;
env APICAST_MODULE;
env APICAST_REQUEST_LOGS;
env APICAST_RESPONSE_CODES;
env APICAST_MANAGEMENT_API;
env BACKEND_ENDPOINT_OVERRIDE;

env APICAST_CONFIGURATION_LOADER;
env APICAST_CONFIGURATION_CACHE;

include ../main.d/*.conf;

error_log /dev/null emerg;
Expand Down

0 comments on commit edc518b

Please sign in to comment.