Add static webserver and storage for pi.paler.net.
This commit is contained in:
46
services/pi.paler.net.hcl
Normal file
46
services/pi.paler.net.hcl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
job "pi.paler.net" {
|
||||||
|
datacenters = ["alo"]
|
||||||
|
|
||||||
|
group "apps" {
|
||||||
|
network {
|
||||||
|
port "http" { }
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "sites-volume" {
|
||||||
|
type = "csi"
|
||||||
|
source = "sites-volume"
|
||||||
|
access_mode = "single-node-reader-only"
|
||||||
|
read_only = true
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "http-server" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "pierrezemb/gostatic"
|
||||||
|
|
||||||
|
ports = [ "http" ]
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"-port=${NOMAD_PORT_http}",
|
||||||
|
"-path=/srv/http/pi.paler.net",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "sites-volume"
|
||||||
|
destination = "/srv/http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.piserver.entryPoints=websecure"
|
||||||
|
- "traefik.http.routers.piserver.rule=Host(`pi.paler.net`)"
|
||||||
|
- "traefik.http.routers.piserver.middlewares=hsts@file"
|
||||||
|
- "traefik.http.routers.piserver.tls.certResolver=letsencrypt"
|
||||||
|
*/
|
||||||
26
storage/sites-volume.hcl
Normal file
26
storage/sites-volume.hcl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
id = "sites-volume"
|
||||||
|
name = "sites-volume"
|
||||||
|
type = "csi"
|
||||||
|
plugin_id = "seaweedfs"
|
||||||
|
|
||||||
|
capacity_min = "256GiB"
|
||||||
|
capacity_max = "512GiB"
|
||||||
|
|
||||||
|
capability {
|
||||||
|
access_mode = "multi-node-single-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional: for 'nomad volume create', specify mount options to validate for
|
||||||
|
# 'attachment_mode = "file-system". Registering an existing volume will record
|
||||||
|
# but ignore these fields.
|
||||||
|
mount_options {
|
||||||
|
mount_flags = ["rw"]
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
# Available options: https://github.com/seaweedfs/seaweedfs-csi-driver/blob/master/pkg/driver/mounter_seaweedfs.go
|
||||||
|
collection = "sites"
|
||||||
|
replication = "001"
|
||||||
|
path = "/sites"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user