diff options
author | Maximilien Richer <me@mricher.fr> | 2024-10-16 21:08:25 +0200 |
---|---|---|
committer | Maximilien Richer <me@mricher.fr> | 2024-10-16 21:08:25 +0200 |
commit | 9467dfea2adf92efbf527b7c4bb535d489b899ef (patch) | |
tree | cbe1af860c333be75f249b445c66287c9f82373d /cluster/prod/app/cryptpad/deploy | |
parent | d568dea939d0e5ee804920653a4e01f6fbbb4c1c (diff) | |
download | nixcfg-9467dfea2adf92efbf527b7c4bb535d489b899ef.tar.gz nixcfg-9467dfea2adf92efbf527b7c4bb535d489b899ef.zip |
Add cryptad-debug instance with cloned data
Diffstat (limited to 'cluster/prod/app/cryptpad/deploy')
-rw-r--r-- | cluster/prod/app/cryptpad/deploy/cryptpad-debug.hcl | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/cluster/prod/app/cryptpad/deploy/cryptpad-debug.hcl b/cluster/prod/app/cryptpad/deploy/cryptpad-debug.hcl new file mode 100644 index 0000000..9681636 --- /dev/null +++ b/cluster/prod/app/cryptpad/deploy/cryptpad-debug.hcl @@ -0,0 +1,78 @@ +job "cryptpad-debug" { + datacenters = ["neptune"] + type = "service" + + group "cryptpad" { + count = 1 + + network { + port "http" { + to = 3000 + } + } + + restart { + attempts = 10 + delay = "30s" + } + + task "main" { + driver = "docker" + + constraint { + attribute = "${attr.unique.hostname}" + operator = "=" + value = "courgette" + } + + config { + image = "kokakiwi/cryptpad:2024.9.0" + ports = [ "http" ] + + volumes = [ + "/mnt/ssd/cryptpad-debug:/mnt", + "secrets/config-debug.js:/cryptpad/config.js", + ] + } + env { + CRYPTPAD_CONFIG = "/cryptpad/config.js" + } + + template { + data = file("../config/config-debug.js") + destination = "secrets/config-debug.js" + } + + /* 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-debug.js") + destination = "secrets/config-debug.js" + } + */ + + resources { + memory = 1000 + cpu = 500 + } + + service { + name = "cryptpad" + port = "http" + tags = [ + "tricot pad-debug.deuxfleurs.fr", + "tricot pad-sandbox-debug.deuxfleurs.fr", + "tricot-add-header Cross-Origin-Resource-Policy cross-origin", + "tricot-add-header Cross-Origin-Embedder-Policy require-corp", + "d53-cname pad-debug.deuxfleurs.fr", + "d53-cname pad-sandbox-debug.deuxfleurs.fr", + ] + check { + type = "http" + path = "/" + interval = "10s" + timeout = "2s" + } + } + } + } +} |