aboutsummaryrefslogtreecommitdiff
path: root/cluster
diff options
context:
space:
mode:
authorArmaël Guéneau <armael.gueneau@ens-lyon.org>2024-11-08 22:31:09 +0100
committerArmaël Guéneau <armael.gueneau@ens-lyon.org>2024-11-09 18:49:11 +0100
commitb279f1e0db4fd2529bc325a790a13746ad2aec34 (patch)
tree0e839705b4f51609a2a0e3f69a6b4864e3ec3527 /cluster
parentd0341caf77355dad955d271b41d1d832a55b40de (diff)
downloadnixcfg-b279f1e0db4fd2529bc325a790a13746ad2aec34.tar.gz
nixcfg-b279f1e0db4fd2529bc325a790a13746ad2aec34.zip
staging: tricot compilé avec musl, dans une image docker
Correspond à: https://git.deuxfleurs.fr/Deuxfleurs/tricot/pulls/15
Diffstat (limited to 'cluster')
-rw-r--r--cluster/staging/app/core/deploy/tricot.hcl23
1 files changed, 14 insertions, 9 deletions
diff --git a/cluster/staging/app/core/deploy/tricot.hcl b/cluster/staging/app/core/deploy/tricot.hcl
index 54be69f..e7aded6 100644
--- a/cluster/staging/app/core/deploy/tricot.hcl
+++ b/cluster/staging/app/core/deploy/tricot.hcl
@@ -21,20 +21,25 @@ job "core-tricot" {
}
task "server" {
- driver = "nix2"
+ driver = "docker"
config {
- packages = [
- "git+https://git.deuxfleurs.fr/Deuxfleurs/tricot.git?ref=main&rev=9bb505d977cb8bafd8039159241788ff25510d69"
+ image = "armael/tricot:n6dk1b5xrdww12zf12jbcmihqs6g1brz"
+ network_mode = "host"
+ readonly_rootfs = true
+ ports = [ "http_port", "https_port" ]
+ volumes = [
+ "secrets:/etc/tricot",
]
- command = "tricot"
- # cap_add = [ "net_bind_service" ] # this doesn't work for whatever reason, so we need to put user = "root" instead
+ ulimit {
+ nofile = "65535:65535"
+ }
}
- user = "root"
resources {
cpu = 500
memory = 200
+ memory_max = 500
}
restart {
@@ -46,17 +51,17 @@ job "core-tricot" {
template {
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
- destination = "etc/tricot/consul-ca.crt"
+ destination = "secrets/consul-ca.crt"
}
template {
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
- destination = "etc/tricot/consul-client.crt"
+ destination = "secrets/consul-client.crt"
}
template {
data = "{{ key \"secrets/consul/consul-client.key\" }}"
- destination = "etc/tricot/consul-client.key"
+ destination = "secrets/consul-client.key"
}
template {