iac/modules/castopod/files/mariadb.container.tftpl
Florian Maury 1b9eeb1288 blip
2025-01-10 16:10:39 +01:00

28 lines
670 B
Text

[Unit]
Description = "MariaDB Container"
Wants=generate_secrets.service
After=generate_secrets.service
[Container]
ContainerName = "${mariadb_container_name}"
Image = "docker.io/mariadb:${mariadb_version}"
Volume = ${mariadb_data_volume_name}.volume:/var/lib/mysql:z
Network = ${castopod_backend_network_name}.network
EnvironmentFile=${secrets_path}/mariadb-root-password.env
EnvironmentFile=${secrets_path}/mariadb-password.env
Environment=MARIADB_DATABASE=${castopod_db_name}
Environment=MARIADB_USER=${castopod_db_user}
# skips chown that would cause a EPERM on lost+found
User=mysql
Group=mysql
[Service]
Restart=on-failure
[Install]
WantedBy=default.target