#!/bin/sh
# Wrapper around CHP entrypoint that changes defaults slightly
# to be more appropriate when run in a container.

case "$@" in
  *"--api-ip"*)
    break;;
  *)
    # Default api-ip to all interfaces in docker,
    # so that it is accessible to other containers
    # and when port-forwarding is requested.
    ARGS="--api-ip=0.0.0.0";;
esac

configurable-http-proxy $ARGS $@
