@ -13,3 +13,4 @@ $ docker run -d -p 80:80 -e API_URL=http://localhost:4000/swagger schickling/swa
* `API_URL` - Swagger endpoint for your API
* `API_KEY` - Default API Key (optional)
* `PORT` - Default port to run on (optional)
* `VALIDATOR_URL` - Swagger validator (optional)
@ -16,4 +16,8 @@ else
sed -i "s|http://example.com/api|$API_URL|g" index.html
fi
if [[ -n "$VALIDATOR_URL" ]]; then
sed -i "s|url: url,.*|url: url, validatorUrl: \"${VALIDATOR_URL}\",|g" index.html
exec http-server -p $PORT $*