Publishing a container port with
ports: - "6379:6379" in Docker Compose writes rules straight into iptables and completely bypasses UFW on Ubuntu. Always bind internal databases and caches to 127.0.0.1:6379:6379 so you don't expose Redis or Postgres to the public internet.commit 676854e