2022-05-06 09:43:49 +00:00
|
|
|
job "cryptpad" {
|
2024-05-12 20:02:22 +00:00
|
|
|
datacenters = ["neptune"]
|
2022-05-06 09:43:49 +00:00
|
|
|
type = "service"
|
2024-04-18 16:45:07 +00:00
|
|
|
|
2022-05-06 09:43:49 +00:00
|
|
|
group "cryptpad" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
network {
|
2022-05-10 13:17:55 +00:00
|
|
|
port "http" {
|
2022-05-06 09:43:49 +00:00
|
|
|
to = 3000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
restart {
|
|
|
|
attempts = 10
|
|
|
|
delay = "30s"
|
|
|
|
}
|
|
|
|
|
|
|
|
task "main" {
|
|
|
|
driver = "docker"
|
2022-05-10 13:17:55 +00:00
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.unique.hostname}"
|
|
|
|
operator = "="
|
2024-05-12 20:02:22 +00:00
|
|
|
value = "courgette"
|
2022-05-10 13:17:55 +00:00
|
|
|
}
|
|
|
|
|
2022-05-06 09:43:49 +00:00
|
|
|
config {
|
2024-11-08 18:11:10 +00:00
|
|
|
image = "kokakiwi/cryptpad:2024.9.0"
|
2022-05-10 13:17:55 +00:00
|
|
|
ports = [ "http" ]
|
2022-05-06 09:43:49 +00:00
|
|
|
|
|
|
|
volumes = [
|
2023-03-13 18:58:37 +00:00
|
|
|
"/mnt/ssd/cryptpad:/mnt",
|
2024-04-18 16:45:07 +00:00
|
|
|
"secrets/config.js:/cryptpad/config.js",
|
2022-05-06 09:43:49 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
env {
|
2024-04-18 16:45:07 +00:00
|
|
|
CRYPTPAD_CONFIG = "/cryptpad/config.js"
|
2022-05-06 09:43:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = file("../config/config.js")
|
|
|
|
destination = "secrets/config.js"
|
|
|
|
}
|
|
|
|
|
2022-05-10 13:17:55 +00:00
|
|
|
/* Disabled because it requires modifications to the docker image and I do not want to invest the time yet
|
|
|
|
template {
|
|
|
|
data = file("../config/application_config.js")
|
|
|
|
destination = "secrets/config.js"
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2022-05-06 09:43:49 +00:00
|
|
|
resources {
|
|
|
|
memory = 1000
|
|
|
|
cpu = 500
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
2022-12-07 11:03:15 +00:00
|
|
|
name = "cryptpad"
|
2022-05-10 13:17:55 +00:00
|
|
|
port = "http"
|
2022-05-06 09:43:49 +00:00
|
|
|
tags = [
|
|
|
|
"tricot pad.deuxfleurs.fr",
|
|
|
|
"tricot pad-sandbox.deuxfleurs.fr",
|
2022-05-06 10:22:59 +00:00
|
|
|
"tricot-add-header Cross-Origin-Resource-Policy cross-origin",
|
|
|
|
"tricot-add-header Cross-Origin-Embedder-Policy require-corp",
|
2024-11-07 22:45:49 +00:00
|
|
|
"tricot-add-header Access-Control-Allow-Origin *",
|
2024-11-07 22:19:37 +00:00
|
|
|
"tricot-add-header Access-Control-Allow-Credentials true",
|
2024-04-19 06:53:48 +00:00
|
|
|
"d53-cname pad.deuxfleurs.fr",
|
|
|
|
"d53-cname pad-sandbox.deuxfleurs.fr",
|
2022-05-06 09:43:49 +00:00
|
|
|
]
|
|
|
|
check {
|
|
|
|
type = "http"
|
|
|
|
path = "/"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|