Fix upgrade task

This commit is contained in:
Daniel Berteaud 2023-10-25 23:08:38 +02:00
parent 75db82f0db
commit 22609366df
2 changed files with 9 additions and 4 deletions

View File

@ -3,4 +3,4 @@ MAINTAINER [[ .docker.maintainer ]]
RUN set -eux &&\
apk --no-cache upgrade &&\
apk --no-cache add mariadb-client
apk --no-cache add mariadb-client mariadb-server-utils

View File

@ -46,7 +46,7 @@ job [[ .mariadb.instance | toJSON ]] {
}
# Run mysql_upgrade
task "manage" {
task "upgrade" {
driver = [[ $c.nomad.driver | toJSON ]]
lifecycle {
@ -55,8 +55,7 @@ job [[ .mariadb.instance | toJSON ]] {
config {
image = [[ .mariadb.manage.image | toJSON ]]
pids_limit = 50
readonly_rootfs = true
pids_limit = 100
command = "/local/mysql_upgrade.sh"
volumes = [
"secrets/my.cnf:/root/.my.cnf:ro"
@ -73,6 +72,7 @@ job [[ .mariadb.instance | toJSON ]] {
data = <<_EOT
[client]
user = root
host = 127.0.0.1
password = {{ with secret "[[ .vault.prefix ]]kv/service/[[ .mariadb.instance ]]" }}{{ .Data.data.root_pwd }}{{ end }}
_EOT
destination = "secrets/my.cnf"
@ -89,6 +89,11 @@ _EOT
perms = 755
}
volume_mount {
volume = "mariadb"
destination = "/data"
}
resources {
cpu = 10
memory = 32