pushpin icon indicating copy to clipboard operation
pushpin copied to clipboard

intergate a small backend server with existing pushpin Docker file

Open bharath-naik opened this issue 3 years ago • 3 comments

Running pushpin Docker as a container works fine as standalone. Now i am trying to add a small nodejs banckend application to the existing pushpin Dockerfile so that i can set headers and also acts as a reverse proxy for pushpin. but as the Dokcerfile has the limitation of single CMD command i cannot run the node server command once again in the same Dockerfile. eg: CMD ["pushpin", "--merge-output"]. how can i solve this.

bharath-naik avatar Jun 05 '21 09:06 bharath-naik

Hi,

It's best to run separate containers if you can. This is typically how containerized deployments are done. It's also a good way to deploy Pushpin, because multiple backend instances may need to share the same Pushpin instances.

But if you really need to run multiple programs in one container, you can use something like supervisord as the main CMD.

jkarneges avatar Jun 07 '21 23:06 jkarneges

Thanks @jkarneges. it helped I have created pushpin and backend containers and deployed in GKE with istio(service mesh) and in the routes file of pushpin container, I have given as mbackend1-service.default.svc.cluster.local:8000/* while accessing the 7999 port from the browser it says No route for host: 1xx.1xx.1xx.4. Does routes file accept only DNS and IP address only or will it also accept the service urls like service-name.namespace.cluster.local

bharath-naik avatar Jun 09 '21 11:06 bharath-naik

Pushpin uses DNS lookups to resolve targets, so service URLs should work.

jkarneges avatar Jun 09 '21 21:06 jkarneges