2021-01-08 20:05:13 +00:00
|
|
|
job "freshrss" {
|
|
|
|
datacenters = ["columbia"]
|
|
|
|
region = "global"
|
|
|
|
type = "service"
|
|
|
|
|
2021-07-30 03:51:21 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${meta.storage_optimized}"
|
|
|
|
value = "true"
|
|
|
|
}
|
|
|
|
|
2021-01-08 20:05:13 +00:00
|
|
|
update {
|
|
|
|
stagger = "30s"
|
|
|
|
max_parallel = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
group "freshrss" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
task "freshrss" {
|
|
|
|
vault {
|
|
|
|
policies = ["default", "ansible"]
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2022-06-25 14:19:15 +00:00
|
|
|
image = "docker-repo.service.masked.name:5000/freshrss"
|
2021-01-08 20:05:13 +00:00
|
|
|
ports = ["http"]
|
|
|
|
volumes = [
|
|
|
|
"/mnt/raid/rss:/var/www/FreshRSS/data"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "freshrss"
|
|
|
|
port = "http"
|
|
|
|
|
|
|
|
check {
|
|
|
|
name = "freshrss"
|
|
|
|
type = "tcp"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
address_mode = "driver"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
{{- with secret "pki_int/issue/masked-dot-name" "common_name=freshrss.service.masked.name" "alt_names=freshrss.service.columbia.masked.name" -}}
|
|
|
|
{{- .Data.certificate -}}
|
|
|
|
{{- end -}}
|
|
|
|
EOH
|
|
|
|
destination = "${NOMAD_SECRETS_DIR}/freshrss.crt"
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
{{- with secret "pki_int/issue/masked-dot-name" "common_name=freshrss.service.masked.name" "alt_names=freshrss.service.columbia.masked.name" -}}
|
|
|
|
{{- .Data.private_key -}}
|
|
|
|
{{- end -}}
|
|
|
|
EOH
|
|
|
|
destination = "${NOMAD_SECRETS_DIR}/freshrss.key"
|
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
2021-06-06 21:51:45 +00:00
|
|
|
CRON_MIN = '13,43'
|
|
|
|
FRESHRSS_ENV = "production"
|
2022-07-15 01:48:51 +00:00
|
|
|
FRESHRSS_INSTALL = " --api_enabled --base_url https://rss.minhas.io --db-base freshrss --db-host sedan.node.masked.name --db-password {{ with secret "kv/data/freshrss" }}{{ .Data.data.db_pw }}{{ end }} --db-type pgsql --db-user freshrss --default_user asara --language en --base_url https://rss.minhas.io"
|
2021-06-06 21:51:45 +00:00
|
|
|
JAVA_ARGS = "-Xmx2048m"
|
2021-01-16 20:12:58 +00:00
|
|
|
POSTGRES_DB = "freshrss"
|
2022-07-15 01:48:51 +00:00
|
|
|
POSTGRES_HOST = "sedan.node.masked.name"
|
2021-06-06 21:51:45 +00:00
|
|
|
POSTGRES_PASSWORD = "{{ with secret "kv/data/freshrss" }}{{ .Data.data.db_pw }}{{ end }}"
|
|
|
|
POSTGRES_USER = "freshrss"
|
2021-01-16 20:12:58 +00:00
|
|
|
ROOT_URL = "${NOMAD_ADDR_http}"
|
|
|
|
TZ = "America/New_York"
|
2021-01-08 20:05:13 +00:00
|
|
|
EOH
|
|
|
|
destination = "secrets/freshrss.env"
|
|
|
|
env = true
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 2000
|
|
|
|
memory = 2560
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
network {
|
|
|
|
port "http" {
|
|
|
|
to = 80
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|