update entrypoint to use env varibales.