Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Is there a service to quickly build APIs from Docker containers?
1 point by michidk on April 21, 2024 | hide | past | favorite | 3 comments
I want to be able to just provide a Docker container or upload a shell script and then get a URL which I can expose along with API tokens I can hand out. My container can either return just text or a file after processing for a while. Examples would be pdf generation, calculations, running an LLM. The file would be uploaded to some object storage and give me a temporary URL. Queuing, rate limiting etc should be handled automatically. Is there something like this or do I need to build it myself?


You want a Docker container that runs a script and responds to requests it receives, and an address that it can receive data at, is that correct? That sounds like an HTTP server. You should configure a Docker container with the appropriate scripts, give it the ability to respond to HTTP requests, upload it to a container registry (AWS, DigitalOcean), and then run it on a container service (e.g. AWS ECS). You'll then be provided an IP address that you can issue requests to.


And I want it to be able to handle lots of connections. One server might not be enough, so it needs to scale. The process could also take a while, so I need a queue. Yeah I could setup, AWS API Gateway, SQS, ECS with Autoscaling etc. But that's a lot of boilerplate.


You need to do the work and build it yourself, to answer your question. All those services are effectively “boilerplate” for manually standing up a server, setting up replication, etc. But you still need to configure AWS/GCP/DO to do whatever you need.

If it’s your first time doing it, then yeah you’ve got to read some documentation a bit and figure it out. It becomes much easier after the second and third time you do it, to the point where it can all be configured within a day.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: