TykTechnologies / tyk-gateway-docker

Docker compose deployment to run Tyk OSS Gateway
96 stars 80 forks source link

Tyk container to accept configuration file path as environment variable #39

Closed sreekanthgs closed 4 years ago

sreekanthgs commented 4 years ago

Hi, currently the tyk container expects the conf file to be at /opt/tyk-gateway/tyk.conf though the binary can accept a --conf command line switch. This restriction is imposed through hard wiring inside the entrypoint.sh. It'd be great if this can be considered from an environment variable, like the TYK_GW_SECRET currently does.

As seen in master branch (entrypoint.sh)

TYKCONF=/opt/tyk-gateway/tyk.conf

# for backwards compatibility if TYKSECRET is not empty, then set TYK_GW_SECRET to TYKSECRET
if [[ -n "${TYKSECRET}" ]]; then
  export TYK_GW_SECRET="${TYKSECRET}"
fi

Thank you