Add Minio Service
This commit is contained in:
59
nomad_jobs/services/minio/minio-singleton.nomad.hcl
Normal file
59
nomad_jobs/services/minio/minio-singleton.nomad.hcl
Normal file
@@ -0,0 +1,59 @@
|
||||
job "minio-singleton" {
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
|
||||
group "minio" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
port "console" {
|
||||
to = 9090
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
# Make available to other services by the 'minio-singleton' name
|
||||
name = "minio-singleton"
|
||||
port = "9000"
|
||||
tags = ["traefik.enable=false"] # Hide minio from traefik
|
||||
|
||||
connect {
|
||||
sidecar_service {
|
||||
tags = ["traefik.enable=false"] # Hide minio from traefik
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
volume "minio-data" {
|
||||
type = "host"
|
||||
source = "minio"
|
||||
}
|
||||
|
||||
task "minio" {
|
||||
driver = "docker"
|
||||
|
||||
volume_mount {
|
||||
volume = "minio-data"
|
||||
destination = "/data"
|
||||
}
|
||||
|
||||
config {
|
||||
image = "quay.io/minio/minio"
|
||||
ports = ["console"]
|
||||
command = "server"
|
||||
args = ["/data", "--console-address", ":9090"]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 100
|
||||
memory = 2000
|
||||
}
|
||||
|
||||
env {
|
||||
MINIO_ROOT_USER="op://InfraSecrets/Minio-Singleton/username"
|
||||
MINIO_ROOT_PASSWORD="op://InfraSecrets/Minio-Singleton/password"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user