Can I run Keycloak with Docker Compose in production?
Yes, for single-node deployments with PostgreSQL, persistent volumes, TLS at a reverse proxy, and tested backups. For high availability you need multiple Keycloak nodes behind a load balancer, which is where Kubernetes or managed Keycloak hosting becomes the better fit.
What database should Keycloak use in Docker?
PostgreSQL is the most widely deployed and best tested option, and it is what this generator configures. The embedded dev-file (H2) database is for quick experiments only: it loses data when the container stops and does not support clustering.
Can Keycloak use Redis instead of Infinispan?
Not out of the box, but Locke, an open-source Keycloak distribution by Skycloak, adds a Redis cache backend selectable with one environment variable. Pick Locke in the Distribution dropdown above to generate a ready-to-run compose file with Redis included.