Is it possible to run multiple web services on a single Toolforge tool? For instance, is it possible to run a PHP service for any /api routes and a node.js service for all other routes?
Or would we need to create two tools?
Thanks! David Barratt
On Wed, Aug 14, 2019 at 6:39 AM David Barratt dbarratt@wikimedia.org wrote:
Is it possible to run multiple web services on a single Toolforge tool? For instance, is it possible to run a PHP service for any /api routes and a node.js service for all other routes?
Or would we need to create two tools?
I would recommend using two tool accounts, one for each language runtime. Our `webservice` helper program and the tooling behind the scenes that makes the routing of tools.wmflabs.org/<your_tool_name> work does not currently support multiple proxy entries for a single tool.
It may be possible to do some double proxy trickery using $HOME/.lighttpd.conf configuration in a PHP tool to to a second tool, but it seems like the case you are currently describing would be easier handled with a <whatever> tool that is your "main" tool running as a nodejs container and a related <whatever>-api tool running as a PHP container.
Bryan
Awesome. Thanks!
On Wed, Aug 14, 2019 at 9:23 AM Bryan Davis bd808@wikimedia.org wrote:
On Wed, Aug 14, 2019 at 6:39 AM David Barratt dbarratt@wikimedia.org wrote:
Is it possible to run multiple web services on a single Toolforge tool?
For instance, is it possible to run a PHP service for any /api routes and a node.js service for all other routes?
Or would we need to create two tools?
I would recommend using two tool accounts, one for each language runtime. Our `webservice` helper program and the tooling behind the scenes that makes the routing of tools.wmflabs.org/<your_tool_name> work does not currently support multiple proxy entries for a single tool.
It may be possible to do some double proxy trickery using $HOME/.lighttpd.conf configuration in a PHP tool to to a second tool, but it seems like the case you are currently describing would be easier handled with a <whatever> tool that is your "main" tool running as a nodejs container and a related <whatever>-api tool running as a PHP container.
Bryan
Bryan Davis Technical Engagement Wikimedia Foundation Principal Software Engineer Boise, ID USA [[m:User:BDavis_(WMF)]] irc: bd808
Wikimedia Cloud Services mailing list Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/cloud