Update to 2.1.4 + cleanup

This commit is contained in:
Daniel Berteaud 2024-04-28 13:47:17 +02:00
parent 2fb3ce3a30
commit 5d5553d481
4 changed files with 36 additions and 37 deletions

View File

@ -1,7 +1,7 @@
FROM danielberteaud/alpine:24.4-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ARG MINIFLUX_VERSION=2.1.2
ARG MINIFLUX_VERSION=2.1.3
ENV LISTEN_ADDR=0.0.0.0:8085 \
RUN_MIGRATIONS=1 \

View File

@ -5,20 +5,23 @@ job "miniflux" {
region = "global"
group "miniflux" {
count = 1
count = 1
shutdown_delay = "6s"
ephemeral_disk {
# Use minimal ephemeral disk
size = 101
}
network {
mode = "bridge"
}
ephemeral_disk {
size = 101
}
service {
name = "miniflux"
port = 8085
@ -70,8 +73,8 @@ job "miniflux" {
type = "http"
path = "/healthcheck"
expose = true
interval = "10s"
timeout = "3s"
interval = "30s"
timeout = "5s"
check_restart {
limit = 20
@ -128,9 +131,10 @@ job "miniflux" {
driver = "docker"
config {
image = "danielberteaud/miniflux:2.1.2-2"
pids_limit = 100
image = "danielberteaud/miniflux:2.1.3-1"
readonly_rootfs = true
pids_limit = 100
}
@ -147,15 +151,6 @@ job "miniflux" {
BASE_URL = "https://flux.example.org"
}
template {
data = <<_EOT
DATABASE_URL=postgresql://{{ with secret "database/creds/miniflux" }}{{ .Data.username }}{{ end }}:{{ with secret "database/creds/miniflux" }}{{ urlquery .Data.password }}{{ end }}@127.0.0.1:5432/miniflux?sslmode=disable
_EOT
destination = "secrets/.db.env"
perms = 400
env = true
}
# Use a template block instead of env {} so we can fetch values from vault
@ -170,6 +165,16 @@ _EOT
}
template {
data = <<_EOT
DATABASE_URL=postgresql://{{ with secret "database/creds/miniflux" }}{{ .Data.username }}{{ end }}:{{ with secret "database/creds/miniflux" }}{{ urlquery .Data.password }}{{ end }}@127.0.0.1:5432/miniflux?sslmode=disable
_EOT
destination = "secrets/.db.env"
perms = 400
env = true
}
resources {
cpu = 50
memory = 192

View File

@ -1,12 +1,10 @@
job "[[ .instance ]]" {
[[- $c := merge .miniflux . ]]
[[ template "common/job_start" $c ]]
[[ template "common/job_start" . ]]
group "miniflux" {
count = [[ .miniflux.count ]]
[[- $c := merge .miniflux . ]]
[[ template "common/group_start" $c ]]
network {
mode = "bridge"
@ -15,10 +13,6 @@ job "[[ .instance ]]" {
[[- end ]]
}
ephemeral_disk {
size = 101
}
service {
name = "[[ .instance ]][[ .consul.suffix ]]"
port = 8085
@ -30,8 +24,8 @@ job "[[ .instance ]]" {
type = "http"
path = "/healthcheck"
expose = true
interval = "10s"
timeout = "3s"
interval = "[[ $c.consul.check.interval ]]"
timeout = "[[ $c.consul.check.timeout ]]"
check_restart {
limit = 20
@ -52,9 +46,8 @@ job "[[ .instance ]]" {
driver = "[[ $c.nomad.driver ]]"
config {
image = "[[ .miniflux.image ]]"
[[ template "common/image" $c ]]
pids_limit = 100
readonly_rootfs = true
}
[[ template "common/vault.policies" $c ]]
@ -67,6 +60,8 @@ job "[[ .instance ]]" {
[[- end ]]
}
[[ template "common/file_env" $c ]]
template {
data =<<_EOT
DATABASE_URL=postgresql://
@ -81,7 +76,6 @@ _EOT
env = true
}
[[ template "common/file_env" $c ]]
[[ template "common/resources" $c ]]
}
}

View File

@ -6,10 +6,10 @@ instance: miniflux
miniflux:
# Version of miniflux
version: 2.1.2
version: 2.1.3
# Docker image to use
image: '[[ .docker.repo ]]miniflux:[[ .miniflux.version ]]-2'
image: '[[ .docker.repo ]]miniflux:[[ .miniflux.version ]]-1'
# Number of instance to run
count: 1