From 8cd2f72926293a8bca1b42fe7bccb2b9e61740d1 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 10 May 2022 15:17:55 +0200 Subject: Working cryptpad --- app/cryptpad/deploy/cryptpad.hcl | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'app/cryptpad/deploy') diff --git a/app/cryptpad/deploy/cryptpad.hcl b/app/cryptpad/deploy/cryptpad.hcl index b04b330..726fe5a 100644 --- a/app/cryptpad/deploy/cryptpad.hcl +++ b/app/cryptpad/deploy/cryptpad.hcl @@ -6,12 +6,9 @@ job "cryptpad" { count = 1 network { - port "unsafe" { + port "http" { to = 3000 } - port "sandbox" { - to = 3001 - } } restart { @@ -21,9 +18,16 @@ job "cryptpad" { task "main" { driver = "docker" + + constraint { + attribute = "${attr.unique.hostname}" + operator = "=" + value = "courgette" + } + config { - image = "superboum/cryptpad:7l2fgdl9bfvf8s87rparamm9cvhb5ind" - ports = [ "unsafe", "sandbox" ] + image = "superboum/cryptpad:0p3s44hjh4s1x55kbwkmywmwmx4wfyb8" + ports = [ "http" ] volumes = [ "/mnt/storage/cryptpad:/mnt", @@ -39,29 +43,22 @@ job "cryptpad" { destination = "secrets/config.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.js") + destination = "secrets/config.js" + } + */ + resources { memory = 1000 cpu = 500 } service { - port = "unsafe" + port = "http" tags = [ "tricot pad.deuxfleurs.fr", - "tricot-add-header Cross-Origin-Resource-Policy cross-origin", - "tricot-add-header Cross-Origin-Embedder-Policy require-corp", - ] - check { - type = "http" - path = "/" - interval = "10s" - timeout = "2s" - } - } - - service { - port = "sandbox" - tags = [ "tricot pad-sandbox.deuxfleurs.fr", "tricot-add-header Cross-Origin-Resource-Policy cross-origin", "tricot-add-header Cross-Origin-Embedder-Policy require-corp", -- cgit v1.2.3