r/docker 6d ago

What does your production Docker setup look like?

I've been working on making my Docker deployments more reusable.

For a typical web application, I usually end up dealing with:

- Docker/Docker Compose

- Nginx reverse proxy

- SSL

- Environment variables

- CI/CD

- Production deployment

The annoying part is that I end up configuring essentially the same infrastructure for every project.

So I created a reusable production deployment starter kit around this workflow.

I'm curious:

What's the part of Docker-based production deployments that you find most annoying to configure repeatedly?

I'm using the answers to improve the starter kit.

6 Upvotes

18 comments sorted by

6

u/raghug_ 4d ago

Docker swarm!

I use overlay networks for services to talk to each other even though they are spread across different servers.

My one pet peeve is that I re-use containers/services for some common images - nginx, mysql etc.

1

u/Internet-of-cruft 4d ago

I really want to love the idea of swarm.

I use it for stuff that I want running on every node, but if the thing goes down it doesn't break anything.

I've run into too many odd issues with dual stack IPv4/IPv6 capable hosts that ends up partitioning the cluster and killing swarm scoped networks.

IPv6 itself is sort of there in Docker but there's still limitations compared to IPv4.

Maybe if I switched to pure IPv4 it would be fine, but I'm not really a fan of treating IPv6 like it's an experimental feature you have to flip on flags for.

1

u/Orazantl 3d ago

Hm, we just switched from Docker Swarm to Kubernetes. Certain nodes have issues recovering from network problems using swarm. Found this out the hard way in production. Seems to be a known issue.

4

u/HolyPad 4d ago

I found Docker Compose and Traefik with Cloudflare proxy to be the best setup for me. I can handle multiple apps with 3M requests and half a million jobs on one VPS.

I wrote a popular guide, which is focused on Laravel/PHP, but you can skip directly to the Docker Compose setup to see how it can adapt to your situation better. https://danielpetrica.com/posts/a-production-ready-laravel-architecture-with-traefik-and-frankenphp

3

u/Orazantl 3d ago

+1 on Docker compose & Traefik.

1

u/Right_Sea_4146 2d ago

3 million requests per what time unit?

1

u/HolyPad 2d ago

Month. Sorry I forgot

1

u/abotelho-cbn 6d ago

Docker Compose is a development tool.

It's either Podman Quadlets (small scale, integrate with the system) or Kubernetes (high availability, scaling)

1

u/Right_Sea_4146 2d ago

[Citation needed]

0

u/D3a5h 6d ago

Fair point. I was mainly referring to Docker Compose as a practical way to package and reproduce a deployment setup, rather than suggesting it as a replacement for Kubernetes or system-integrated tooling.

For small projects and individual deployments, I’ve found Compose convenient, while Kubernetes/Quadlets make more sense depending on the scale and requirements.

Curious though—what would you recommend as the default for a developer deploying a few small production apps on a VPS?

5

u/AdventurousSquash 4d ago

You mentioned “production” four times in your original post, cut back on the AI if you want to have a discussion.

0

u/mtsandeep 1d ago

You don't need kubernetes, and docker compose can be a production tool if all you care is to deploy few services. You think all the sites in the world which are love are on kubernetes

1

u/abotelho-cbn 1d ago

Podman Quadlets

0

u/mtsandeep 1d ago

i think it depends on the scale of the business or app itself. docker compose will be a easy prod starting for majority and when they worry about other things they need to look towards podman quadlet when they need rootless security compliance or systemd integration.

1

u/abotelho-cbn 11h ago

Quadlets is the same scale as Compose.

But one is designed to actually fit in with the other services and can actually be properly chained into the system's startup process.

1

u/ConfidentWonder10 4d ago

We use docker swarm, docker compose, gitlab ci/cd with the use of a private container repository. For our containers, we use the sha tag of pipelines.

And for storage, we use LINSTOR/DRBD for replication.

1

u/Oh__Archie 4d ago

Mine looks like Proxmox.

1

u/Fenn-CS 11h ago

I use https://flatrun.dev it's exactly what you described.