0:00 David Flanagan: Hello and welcome to the Complete Guide to Zitadel. This course is gonna teach you everything you need to be successful, running, managing, and operating Zitadel from development all the way through to production. In order for you to be successful by following this series of videos, you need to understand what the prerequisites are to get started with Zitadel, and that's exactly what we're gonna cover in today's video. Fortunately for us, the only prerequisite to be successful with Zitadel is Postgres. I'm gonna show you how to run Postgres with Docker Compose. I'll give you some advice on how to move that into production in
0:45 a Kubernetes environment, but ultimately, Postgres is up to you. You can use a managed service, a Kubernetes operator, or just throw it straight through Systemd. The choice is yours. But as I said, let's see how to get up and running at least to allow you to explore the rest of Zitadel for this course by taking a look at Postgres on Docker Compose. All right, so here we have a rather uninspiring, uneventful, empty project, almost empty project, and inside the prerequisites directory, we have a 10 line docker composed file. Not exactly life changing, but everything that we need to get
1:30 started for this Zitadel series. The first thing we're gonna do is say that we need some sort of service, a container in this case. That we can access over the PostgreSQL name. This is going to run the Postgres 17 image. Now don't worry if you have not seen mirror.gcr.io before. This is Google's pull through cache replica of the Docker hub that allows you to avoid those nasty rate limits. Pretty handy if you're sitting at a conference right now and you wanna try this out. In order for Postgres to be successful, we do need to specify two
2:07 environment variables, the user and the password for the Postgres instance. Now, I'll only say this once. You should not put this into production. This is to allow us to progress through this series of videos and learn about Zitadel, not spending too much time on the prerequisites and configuring Postgres. So do not put this to production. That's the last thing I'm gonna say. We then need to make sure that port 5432 is available on the host. This is just in case at any point in time we decide to use some sort of PSQL tool on the command line or GUI to introspect and take a look at what
2:47 is happening inside of our database. Other than that, that's it. Now you've got lots of ways to manage Postgres the best way is to not manage Postgres. If you're lucky enough with the budget and a cloud provider, use a managed service. If you prefer to control things on your own and ship your own things to production, check out the Cloud Native PG operator and project. This is the Kubernetes operator that adds custom resource definitions for defining Postgres clusters, including all of the toil chores and hard work for disaster recovery, backups, and operational maintenance. So kudos to this project.
3:30 Go check them out. For the rest of this, we're gonna use these 10 lines. Go to our command line and run docker compose up. Once your image has been pulled, you'll be presented with the init logs from Postgres before Eventually it says: "Hey, we're ready to accept connections", and from here, we're good to go. So let's get to the fun stuff. We'll see you in the next video.