aboutsummaryrefslogtreecommitdiff
path: root/app/cryptpad/deploy/cryptpad.hcl
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-05-06 11:43:49 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-05-06 11:43:49 +0200
commitb75d7c7841a4ed5b9ebef8a2d91ee6e64e3bf5bf (patch)
tree72cb9b19daca05397f814afba20ada6c159109e3 /app/cryptpad/deploy/cryptpad.hcl
parent3df47c8440a3b5645733184f72cc4c2f1a46587f (diff)
downloadnixcfg-b75d7c7841a4ed5b9ebef8a2d91ee6e64e3bf5bf.tar.gz
nixcfg-b75d7c7841a4ed5b9ebef8a2d91ee6e64e3bf5bf.zip
WIP Cryptpad integration to Deuxfleurs
Diffstat (limited to 'app/cryptpad/deploy/cryptpad.hcl')
-rw-r--r--app/cryptpad/deploy/cryptpad.hcl74
1 files changed, 74 insertions, 0 deletions
diff --git a/app/cryptpad/deploy/cryptpad.hcl b/app/cryptpad/deploy/cryptpad.hcl
new file mode 100644
index 0000000..7880cad
--- /dev/null
+++ b/app/cryptpad/deploy/cryptpad.hcl
@@ -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"
+ }
+ }
+ }
+ }
+}