Managing container-based systemd services
In this section, you will learn how to use the podman generate systemd
command through a practical example. We will create two system services based on containers to create a GIT repository.
For this example, we will leverage two well-known open source projects:
- Gitea: The GIT repository, which also offers a nice web interface for code management
- MariaDB: The SQL database for holding the data that's produced by the Gitea service
Let's start with the example. First, we need to generate a password for our database's user:
# export MARIADB_PASSWORD=my-secret-pw # podman secret create --env MARIADB_PASSWORD 53149b678d0dbd34fb56800cc
Here, we exported the environment variable with the secret password we are going to use and then leveraged a useful secrets management command that we did not introduce previously: podman secret create
. Unfortunately, this command holds the secret in plain text, though this...