forked from Deuxfleurs/nixcfg
WIP Cryptpad integration to Deuxfleurs
This commit is contained in:
parent
3df47c8440
commit
b75d7c7841
1 changed files with 74 additions and 0 deletions
74
app/cryptpad/deploy/cryptpad.hcl
Normal file
74
app/cryptpad/deploy/cryptpad.hcl
Normal file
|
@ -0,0 +1,74 @@
|
|||
job "cryptpad" {
|
||||
datacenters = ["neptune"]
|
||||
type = "service"
|
||||
|
||||
group "cryptpad" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "unsafe" {
|
||||
to = 3000
|
||||
}
|
||||
port "sandbox" {
|
||||
to = 3001
|
||||
}
|
||||
}
|
||||
|
||||
restart {
|
||||
attempts = 10
|
||||
delay = "30s"
|
||||
}
|
||||
|
||||
task "main" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "superboum/cryptpad:vkbnygcq2bihcn6m4r9m134v5hdy29c4"
|
||||
ports = [ "unsafe", "sandbox" ]
|
||||
|
||||
volumes = [
|
||||
"/mnt/storage/cryptpad:/mnt",
|
||||
"secrets/config.js:/etc/cryptpad/config.js",
|
||||
]
|
||||
}
|
||||
env {
|
||||
CRYPTPAD_CONFIG = "/etc/cryptpad/config.js"
|
||||
}
|
||||
|
||||
template {
|
||||
data = file("../config/config.js")
|
||||
destination = "secrets/config.js"
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 1000
|
||||
cpu = 500
|
||||
}
|
||||
|
||||
service {
|
||||
port = "unsafe"
|
||||
tags = [
|
||||
"tricot pad.deuxfleurs.fr",
|
||||
]
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
port = "sandbox"
|
||||
tags = [
|
||||
"tricot pad-sandbox.deuxfleurs.fr",
|
||||
]
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue