Skip to content

Commit

Permalink
Merge pull request #292 from 3scale/allow-customizing-env-vars
Browse files Browse the repository at this point in the history
allow exposing more environment variables
  • Loading branch information
mikz authored Mar 14, 2017
2 parents 1008eb5 + 203b5b9 commit 890f69f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

- Use per request configuration when cache is disabled [PR #289](https://github.com/3scale/apicast/pull/289)
- Automatically expose all environment variables starting with `APICAST_` or `THREESCALE_` to nginx [PR #292](https://github.com/3scale/apicast/pull/292)

### Added

- Backend HTTP client that uses cosockets [PR #295](https://github.com/3scale/apicast/pull/295)
- Ability to customize main section of nginx configuration (and expose more env variables) [PR #292](https://github.com/3scale/apicast/pull/292)

### Removed

Expand Down
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
12 changes: 1 addition & 11 deletions apicast/conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
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_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
Empty file added apicast/main.d/.keep
Empty file.

0 comments on commit 890f69f

Please sign in to comment.