openwrt http-server
This commit is contained in:
56
apps/openwrt/live.hcl
Normal file
56
apps/openwrt/live.hcl
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
job "openwrt" {
|
||||||
|
datacenters = ["nummer5"]
|
||||||
|
|
||||||
|
group "apps" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http"{
|
||||||
|
to = 9091
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "openwrt"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.http.routers.openwrt.rule=Host(`openwrt.service.nr5`)",
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "openwrt" {
|
||||||
|
type = "csi"
|
||||||
|
read_only = false
|
||||||
|
source = "openwrt"
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "openwrt" {
|
||||||
|
driver = "podman"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "docker.io/jitesoft/lighttpd"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
PORT = 9091
|
||||||
|
SERVER_ROOT = "/www"
|
||||||
|
SERVER_NAME = "openwrt.service.nr5"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "openwrt"
|
||||||
|
destination = "/www"
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 10
|
||||||
|
memory = 32
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
apps/openwrt/volume.hcl
Normal file
20
apps/openwrt/volume.hcl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
type = "csi"
|
||||||
|
id = "openwrt"
|
||||||
|
name = "openwrt"
|
||||||
|
plugin_id = "nfs"
|
||||||
|
|
||||||
|
capability {
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
context {
|
||||||
|
server = "ebin01.wks"
|
||||||
|
share = "/data/raid1-ssd/app-data/openwrt"
|
||||||
|
mountPermissions = "0"
|
||||||
|
}
|
||||||
|
|
||||||
|
mount_options {
|
||||||
|
fs_type = "nfs"
|
||||||
|
mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user