When I deploy Endpoints on the flexible environment, an nginx-based proxy (which is called Extensible Service Proxy) is deployed automatically as a container within the instance which is used for logging and authentication for the most part.
How to run ESP locally on local dev server?
I created a folder at root path of drive C (C:/esp
), then I copied serviceaccount.json
to it. serviceaccount.json
holds the private key of a service account with the following roles:
ps: you would need to scroll down the menu to find the second and third roles :)
3. Closed Kaspersky, otherwise --volume C:/esp:/esp
won't work.
Executed the command:
docker run --detach --name="esp" --publish 8082:8082 --volume C:/esp:/esp b.gcr.io/endpoints/endpoints-runtime:1 --service ****-backend-api.****-test.appspot.com --version 2016-12-06r1 --backend 10.0.75.1:8080 --service_account_key /esp/serviceaccount.json --http_port 8082
where 10.0.75.1
is IP of docker NIC, and 8080
is which backend local server is listening to.