I would like to set up crowdsec for my openresty (nginx) reverse proxy on fly.io. Crowdsec appears to expect to run on a separate container on the same host than nginx.
Unfortunately, I have not been able to set this up and I need to support with this.
I have tried to create a docker image containing both openresty and crowdsec to run as separate processes but I failed. I have seen that fly now supports having sidecars for machines, but I am configuring my openresty app on fly with the fly.toml file and could not find any documentation on how to configure a sidecar with that config file. It is only documented for the machines api. If I use the machines api to add the crowdsec sidecar to my openresty machine, it will probably be gone after the next deploy action with flyctl, right?
I have seen an unanswered question about this and was wondering if since, somebody managed to achieve that?
What would be a working approach for running Crowdsec next to nginx/openresty?
There’s some docs on how to run multiple processes in one container
However, fly is recently released an early version of multiple containers on a single machine so if you think you have the technical capability to be an early adopter maybe take a look
Great, thank you.
But as the video says: “If you are not a Fly Kubernetes user or you are not working directly with the machines API, this change isn’t really gonna alter how you build application.”
And this is why I asked if there was a way to configure a sidecar with the fly.toml file.
→ If I add the sidecar to my OpenResty fly app using the machines API and later do a deploy with the fly.toml config, will the sidecar go away and need to be re-added using the machines API every time?
Also, I have read the docs for multiple processes inside a fly app, but my problem was that I was not able to set up both OpenResty and Crowdsec inside the same docker image.