158 lines
3.3 KiB
HCL
158 lines
3.3 KiB
HCL
job "immich" {
|
|
constraint {
|
|
attribute = "${attr.cpu.arch}"
|
|
operator = "="
|
|
value = "amd64"
|
|
}
|
|
|
|
datacenters = ["dc1"] # Specify your datacenter
|
|
type = "service"
|
|
|
|
group "immich" {
|
|
count = 1
|
|
|
|
task "immich" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "ghcr.io/imagegenius/immich:2.3.1-noml"
|
|
memory_hard_limit = "2048"
|
|
ports = ["http"]
|
|
volumes = [
|
|
"/mnt/Public/configs/Immich:/config",
|
|
"/mnt/Public/Immich/Photos:/photos",
|
|
"/mnt/Public/Immich/libraries:/libraries" # optional
|
|
]
|
|
}
|
|
|
|
env {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "Etc/UTC"
|
|
DB_HOSTNAME = "master.postgres.service.dc1.consul"
|
|
DB_USERNAME = "postgres"
|
|
DB_PASSWORD = "postgres"
|
|
DB_DATABASE_NAME = "immich"
|
|
DB_PORT = "5432" # optional
|
|
REDIS_HOSTNAME = "redis.service.dc1.consul"
|
|
REDIS_PORT = "6379" # optional
|
|
REDIS_PASSWORD = "" # optional
|
|
MACHINE_LEARNING_HOST = "0.0.0.0" # optional
|
|
MACHINE_LEARNING_PORT = "3003" # optional
|
|
MACHINE_LEARNING_WORKERS = "1" # optional
|
|
MACHINE_LEARNING_WORKER_TIMEOUT = "120" # optional
|
|
DB_VECTOR_EXTENSION= "pgvector"
|
|
}
|
|
service {
|
|
name = "${TASKGROUP}"
|
|
tags = ["immich", "tools",
|
|
"traefik.http.routers.immichlan.rule=Host(`immich.service.dc1.consul`)",
|
|
"traefik.http.routers.immichwan.rule=Host(`immich.fbleagh.duckdns.org`)",
|
|
"traefik.http.routers.immichwan.tls=true",
|
|
]
|
|
port = "http"
|
|
|
|
}
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
|
|
network {
|
|
port "http" {
|
|
static = 8088
|
|
to = 8080
|
|
}
|
|
}
|
|
|
|
restart {
|
|
attempts = 2
|
|
interval = "5m"
|
|
delay = "30s"
|
|
mode = "delay"
|
|
}
|
|
}
|
|
|
|
# group "immichpg" {
|
|
# count = 1
|
|
|
|
# task "immichpg" {
|
|
# driver = "docker"
|
|
|
|
# config {
|
|
# image = "tensorchord/pgvecto-rs:pg14-v0.2.0"
|
|
# ports = ["pg"]
|
|
# }
|
|
# env {
|
|
# POSTGRES_USER="postgres"
|
|
# POSTGRES_PASSWORD = "postgres"
|
|
# POSTGRES_DB = "immich"
|
|
# }
|
|
|
|
# service {
|
|
# name = "${TASKGROUP}"
|
|
# tags = ["immich", "tools"]
|
|
# port = "pg"
|
|
|
|
# }
|
|
# resources {
|
|
# cpu = 500
|
|
# memory = 500
|
|
# }
|
|
# }
|
|
|
|
# network {
|
|
# port "pg" {
|
|
# static = 5433
|
|
# to = 5432
|
|
# }
|
|
# }
|
|
|
|
# restart {
|
|
# attempts = 2
|
|
# interval = "5m"
|
|
# delay = "30s"
|
|
# mode = "delay"
|
|
# }
|
|
|
|
|
|
# }
|
|
|
|
group "redis" {
|
|
count = 1
|
|
|
|
task "redis" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "redis"
|
|
ports = ["redis"]
|
|
}
|
|
service {
|
|
name = "${TASKGROUP}"
|
|
tags = ["wallabag", "tools"]
|
|
port = "redis"
|
|
|
|
}
|
|
resources {
|
|
cpu = 250
|
|
memory = 256
|
|
}
|
|
}
|
|
|
|
network {
|
|
port "redis" {
|
|
static = 6379
|
|
}
|
|
}
|
|
|
|
restart {
|
|
attempts = 2
|
|
interval = "5m"
|
|
delay = "30s"
|
|
mode = "delay"
|
|
}
|
|
}
|
|
}
|