docker-rollout icon indicating copy to clipboard operation
docker-rollout copied to clipboard

Giving example for vanilla NGINX (not nginx-proxy) + docker-gen to the community

Open unixfox opened this issue 5 months ago • 1 comments

Hello,

I would like to give to the community an example of using docker-rollout with a simple vanilla NGINX with docker-gen.

I didn't want to write my NGINX config in docker labels, I wanted to keep using the flexibility of nginx.conf files. And using mounting the docker socket in a separate container (not the nginx webserver) is more secure.

Here is the source code: https://github.com/unixfox/simple-docker-rollout-nginx-dockergen

I tested with wrk and got no "errors" report:

Running 1m test @ http://localhost:8080
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.31ms    2.49ms  40.69ms   86.72%
    Req/Sec     2.99k     3.09k    8.86k    70.75%
  357150 requests in 1.00m, 61.31MB read
  Socket errors: connect 0, read 17, write 0, timeout 0
Requests/sec:   5949.19
Transfer/sec:      1.02MB

unixfox avatar Aug 12 '25 21:08 unixfox

Looks nice! Is it draining working as well? I believe docker-gen would have to only put the container ip in the config file if the healthcheck is passing.

Do you want to contribute your solution to docs/examples so it's available at https://docker-rollout.wowu.dev/examples/?

wowu avatar Aug 14 '25 09:08 wowu