Compare commits

...

2 Commits

Author SHA1 Message Date
0098b66de3 Switch to the new unifi docker image. 2025-04-25 19:50:39 +01:00
11bf328239 Removed unused config. 2025-04-24 10:09:02 +01:00
2 changed files with 53 additions and 50 deletions

View File

@@ -1,44 +0,0 @@
job "titiler" {
datacenters = ["alo"]
group "web" {
network {
port "http" {
to = 8000
}
}
task "server" {
driver = "docker"
config {
image = "ghcr.io/developmentseed/titiler:latest"
ports = ["http"]
volumes = [
"/data/shared/alo_gis/drone_images:/data:ro",
]
}
env {
PORT = "8000"
WORKERS_PER_CORE = "1"
}
service {
name = "titiler"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.titiler.entryPoints=websecure",
#"traefik.http.routers.titiler.middlewares=authentik@file",
]
}
resources {
cpu = 1000
memory = 1000
}
}
}
}

View File

@@ -16,13 +16,15 @@ job "unifi" {
port "p8880" { static = 8880 }
port "p6789" { static = 6789 }
port "p5514" { static = 5514 }
port "mongodb" { static = 27017 }
}
task "controller" {
driver = "docker"
config {
image = "ghcr.io/linuxserver/unifi-controller"
image = "lscr.io/linuxserver/unifi-network-application:latest"
network_mode = "host"
ports = [
"p8443",
@@ -36,13 +38,20 @@ job "unifi" {
"p5514",
]
volumes = [
"/data/compute/appdata/unifi:/config",
"/data/compute/appdata/unifi/data:/config",
]
}
env {
PUID = 1001
PGID = 1001
PUID = 1000
PGID = 1000
TZ = "Etc/UTC"
MONGO_USER = "unifi"
MONGO_PASS = "${var.mongo_pass}"
MONGO_HOST = "mongodb.service.consul"
MONGO_PORT = 27017
MONGO_DBNAME = "unifi"
MONGO_AUTHSOURCE = "admin"
}
service {
@@ -58,8 +67,8 @@ job "unifi" {
}
resources {
cpu = 200
memory = 1024
cpu = 1000
memory = 1500
}
}
@@ -87,5 +96,43 @@ job "unifi" {
memory = 50
}
}
task "mongodb" {
driver = "docker"
config {
image = "mongo:8.0"
ports = ["mongodb"]
volumes = [
"/data/compute/appdata/unifi/mongodb:/data/db",
"/data/compute/appdata/unifi/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro"
]
}
env {
MONGO_INITDB_ROOT_USERNAME = "root"
MONGO_INITDB_ROOT_PASSWORD = "odolc7ETyl0D8LAKFdqV"
MONGO_AUTHSOURCE = "admin"
MONGO_USER = "unifi"
MONGO_PASS = "${var.mongo_pass}"
MONGO_DBNAME = "unifi"
}
service {
name = "mongodb"
port = "mongodb"
}
resources {
cpu = 1024
memory = 1024
}
}
}
}
variable "mongo_pass" {
type = string
default = "GJONX27TleK85hj1dDbI"
}