aboutsummaryrefslogtreecommitdiff
path: root/app/cryptpad/deploy/cryptpad.hcl
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-05-10 15:17:55 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-05-10 15:18:07 +0200
commit8cd2f72926293a8bca1b42fe7bccb2b9e61740d1 (patch)
treeb8242a66a6a3d9b09fe4a3a2896b5ab09aa20364 /app/cryptpad/deploy/cryptpad.hcl
parent79e61b6bfd1585d1ce318d2805b321c218cf3791 (diff)
downloadnixcfg-8cd2f72926293a8bca1b42fe7bccb2b9e61740d1.tar.gz
nixcfg-8cd2f72926293a8bca1b42fe7bccb2b9e61740d1.zip
Working cryptpad
Diffstat (limited to 'app/cryptpad/deploy/cryptpad.hcl')
-rw-r--r--app/cryptpad/deploy/cryptpad.hcl39
1 files changed, 18 insertions, 21 deletions
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",