(I’m using BitBucket so I have to containerize everything, rather an using git repos and Procfiles.)
I’ve made a Docker image that runs a simple HTTP server (“api-server”) and another that has a long-running script (“test-long-script”).
The api container looks like it’s running fine, but how do I get the API server to call the long-script container? To run it from the commandline, I’d use this command:
docker run --rm test-long-script:latest
I want people to be able to make HTTP requests to my api-server web service, like
POST /encode-video or
GET /do-something-slow?foo=bar, and have the request handler send the POSTdata / query params to the slow script:
docker run --rm test-long-script:latest --foo=bar
I can’t find any documentation on how to use workers, or how to communicate between components, besides “you can use the component name” and something about internal ports. What am I missing?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!