fix: use static ports and docker port mapping
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 40s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 40s
This commit is contained in:
10
litefs.yml
10
litefs.yml
@@ -8,18 +8,20 @@ data:
|
|||||||
# Use Consul for leader election
|
# Use Consul for leader election
|
||||||
lease:
|
lease:
|
||||||
type: "consul"
|
type: "consul"
|
||||||
advertise-url: "http://${ADVERTISE_IP}:8081"
|
advertise-url: "http://${ADVERTISE_IP}:20202"
|
||||||
consul:
|
consul:
|
||||||
url: "${CONSUL_URL}"
|
url: "${CONSUL_URL}"
|
||||||
key: "litefs/navidrome"
|
key: "litefs/navidrome"
|
||||||
|
|
||||||
# Internal HTTP API for replication
|
# Internal HTTP API for replication
|
||||||
http:
|
http:
|
||||||
addr: "0.0.0.0:8081"
|
addr: ":20202"
|
||||||
|
|
||||||
# The HTTP Proxy routes traffic to handle write-forwarding
|
# The HTTP Proxy routes traffic to handle write-forwarding
|
||||||
|
# It listens on 8080 inside the container.
|
||||||
|
# Nomad will map host 4533 to this port.
|
||||||
proxy:
|
proxy:
|
||||||
addr: ":${PORT}"
|
addr: ":8080"
|
||||||
target: "localhost:4533"
|
target: "localhost:4533"
|
||||||
db: "navidrome.db"
|
db: "navidrome.db"
|
||||||
passthrough:
|
passthrough:
|
||||||
@@ -29,4 +31,4 @@ proxy:
|
|||||||
- "*.jpg"
|
- "*.jpg"
|
||||||
- "*.jpeg"
|
- "*.jpeg"
|
||||||
- "*.gif"
|
- "*.gif"
|
||||||
- "*.svg"
|
- "*.svg"
|
||||||
@@ -22,19 +22,27 @@ job "navidrome-litefs" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
network {
|
network {
|
||||||
mode = "host"
|
# Request static ports on the host
|
||||||
port "http" {}
|
port "http" {
|
||||||
|
static = 4533
|
||||||
|
to = 8080 # Maps host 4533 to container 8080 (LiteFS Proxy)
|
||||||
|
}
|
||||||
|
port "litefs" {
|
||||||
|
static = 20202
|
||||||
|
to = 20202 # Maps host 20202 to container 20202 (LiteFS Replication)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task "navidrome" {
|
task "navidrome" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
|
|
||||||
config {
|
config {
|
||||||
# Update this to match your actual registry and image name
|
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/navidrome-litefs:latest"
|
||||||
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/navidrome-litefs:latest"
|
privileged = true # Still needed for FUSE
|
||||||
privileged = true # Needed for FUSE
|
ports = ["http", "litefs"]
|
||||||
network_mode = "host"
|
|
||||||
|
|
||||||
|
# Removed network_mode = "host"
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/configs/navidrome_litefs:/var/lib/litefs",
|
"/mnt/configs/navidrome_litefs:/var/lib/litefs",
|
||||||
"/mnt/Public/configs/navidrome:/shared_data",
|
"/mnt/Public/configs/navidrome:/shared_data",
|
||||||
@@ -48,7 +56,7 @@ job "navidrome-litefs" {
|
|||||||
# LiteFS Config
|
# LiteFS Config
|
||||||
CONSUL_URL = "http://${attr.unique.network.ip-address}:8500"
|
CONSUL_URL = "http://${attr.unique.network.ip-address}:8500"
|
||||||
ADVERTISE_IP = "${attr.unique.network.ip-address}"
|
ADVERTISE_IP = "${attr.unique.network.ip-address}"
|
||||||
PORT = "${NOMAD_PORT_http}"
|
PORT = "8080" # Internal proxy port
|
||||||
|
|
||||||
# Navidrome Config
|
# Navidrome Config
|
||||||
ND_DATAFOLDER = "/local/data"
|
ND_DATAFOLDER = "/local/data"
|
||||||
@@ -94,4 +102,4 @@ job "navidrome-litefs" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user