aboutsummaryrefslogtreecommitdiff
path: root/experimental/bad.ssb/deploy/go-ssb-room.hcl
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-21 19:29:08 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-21 19:29:08 +0200
commitf22e24270036e84225ee4efe1086563b9504b26e (patch)
treea30f7e3dbbb3bbfcd57b199689e7522640776dfc /experimental/bad.ssb/deploy/go-ssb-room.hcl
parent4e939f55fc51311fbdc1fca8322cffd39e9b5bca (diff)
downloadnixcfg-f22e24270036e84225ee4efe1086563b9504b26e.tar.gz
nixcfg-f22e24270036e84225ee4efe1086563b9504b26e.zip
SSB experiment
Diffstat (limited to 'experimental/bad.ssb/deploy/go-ssb-room.hcl')
-rw-r--r--experimental/bad.ssb/deploy/go-ssb-room.hcl83
1 files changed, 83 insertions, 0 deletions
diff --git a/experimental/bad.ssb/deploy/go-ssb-room.hcl b/experimental/bad.ssb/deploy/go-ssb-room.hcl
new file mode 100644
index 0000000..c9c4109
--- /dev/null
+++ b/experimental/bad.ssb/deploy/go-ssb-room.hcl
@@ -0,0 +1,83 @@
+job "ssb" {
+ datacenters = ["neptune"]
+ type = "service"
+
+ group "go-ssb-room" {
+ count = 1
+
+ constraint {
+ attribute = "${attr.unique.hostname}"
+ value = "caribou"
+ }
+
+ network {
+ port "web_port" { to = 3888 }
+ port "ssb_port" { to = 8008 }
+ }
+
+ task "go-ssb-room" {
+ driver = "docker"
+ config {
+ image = "lxpz/amd64_go_ssb_room:1"
+ readonly_rootfs = true
+ ports = [ "web_port", "ssb_port" ]
+ network_mode = "host"
+ command = "/app/cmd/server/server"
+ args = [
+ "-https-domain=ssb.staging.deuxfleurs.org",
+ "-repo=/repo",
+ "-aliases-as-subdomains=false",
+ "-lishttp=:3888",
+ ]
+ volumes = [
+ "/mnt/ssd/go-ssb-room:/repo"
+ ]
+ }
+
+ resources {
+ memory = 200
+ }
+
+ service {
+ name = "go-ssb-room-http"
+ tags = [
+ "tricot ssb.staging.deuxfleurs.org",
+ ]
+ port = "web_port"
+ address_mode = "driver"
+ check {
+ type = "tcp"
+ port = "web_port"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+
+ service {
+ name = "go-ssb-room-ssb"
+ tags = [
+ "(diplonat (port 8008))",
+ ]
+ port = "ssb_port"
+ address_mode = "driver"
+ check {
+ type = "tcp"
+ port = "ssb_port"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+ }
+ }
+}
+