2021-01-09 03:42:52 +00:00
|
|
|
job "wallabag" {
|
|
|
|
datacenters = ["columbia"]
|
|
|
|
region = "global"
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
update {
|
|
|
|
stagger = "30s"
|
|
|
|
max_parallel = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
group "wallabag" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
task "wallabag" {
|
|
|
|
vault {
|
|
|
|
policies = ["default", "ansible"]
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
|
|
|
image = "docker.service.masked.name:8082/wallabag"
|
|
|
|
ports = ["http"]
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "wallabag"
|
|
|
|
port = "http"
|
|
|
|
|
|
|
|
check {
|
|
|
|
name = "wallabag"
|
|
|
|
type = "tcp"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
address_mode = "driver"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
{{- with secret "pki_int/issue/masked-dot-name" "common_name=wallabag.service.masked.name" "alt_names=wallabag.service.columbia.masked.name" -}}
|
|
|
|
{{- .Data.certificate -}}
|
|
|
|
{{- end -}}
|
|
|
|
EOH
|
|
|
|
destination = "${NOMAD_SECRETS_DIR}/wallabag.crt"
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
{{- with secret "pki_int/issue/masked-dot-name" "common_name=wallabag.service.masked.name" "alt_names=wallabag.service.columbia.masked.name" -}}
|
|
|
|
{{- .Data.private_key -}}
|
|
|
|
{{- end -}}
|
|
|
|
EOH
|
|
|
|
destination = "${NOMAD_SECRETS_DIR}/wallabag.key"
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
POSTGRES_USER = wallabag
|
|
|
|
POSTGRES_PASSWORD = "{{ with secret "kv/data/wallabag" }}{{ .Data.data.db_pw }}{{ end }}"
|
|
|
|
SYMFONY__ENV__DATABASE_DRIVER = pdo_pgsql
|
|
|
|
SYMFONY__ENV__DATABASE_HOST = ivyking.node.masked.name
|
|
|
|
SYMFONY__ENV__DATABASE_PORT = 5432
|
|
|
|
SYMFONY__ENV__DATABASE_NAME = wallabag
|
|
|
|
SYMFONY__ENV__DATABASE_USER = wallabag
|
|
|
|
SYMFONY__ENV__DATABASE_PASSWORD = "{{ with secret "kv/data/wallabag" }}{{ .Data.data.db_pw }}{{ end }}"
|
|
|
|
SYMFONY__ENV__DOMAIN_NAME = "https://wallabag.minhas.io"
|
2021-07-30 04:57:54 +00:00
|
|
|
POPULATE_DATABASE = False
|
2021-01-09 03:42:52 +00:00
|
|
|
EOH
|
|
|
|
destination = "secrets/wallabag.env"
|
|
|
|
env = true
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2021-08-31 06:04:25 +00:00
|
|
|
cpu = 2000
|
|
|
|
memory = 256
|
2021-01-09 03:42:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
network {
|
|
|
|
port "http" {
|
|
|
|
to = 80
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|