aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2020-12-25 11:48:52 +0100
committerQuentin <quentin@deuxfleurs.fr>2020-12-25 11:48:52 +0100
commit4f23adfbb950f64ce6b94bc746b5cad5613c028e (patch)
tree6d5f9a65e0bf77b3401dc62e21666bc142e79c7a /app
parent1624b348dfcfc0447980064eccc863448d17082d (diff)
downloadinfrastructure-4f23adfbb950f64ce6b94bc746b5cad5613c028e.tar.gz
infrastructure-4f23adfbb950f64ce6b94bc746b5cad5613c028e.zip
Migrated plume
Diffstat (limited to 'app')
-rw-r--r--app/config/configuration/plume/app.env2
-rw-r--r--app/deployment/plume.hcl23
2 files changed, 11 insertions, 14 deletions
diff --git a/app/config/configuration/plume/app.env b/app/config/configuration/plume/app.env
index 4a6adb4..1c234e7 100644
--- a/app/config/configuration/plume/app.env
+++ b/app/config/configuration/plume/app.env
@@ -17,7 +17,7 @@ MIGRATION_DIRECTORY=migrations/postgres
USE_HTTPS=0
ROCKET_ADDRESS=::
-ROCKET_PORT=7878
+ROCKET_PORT={{ env "NOMAD_PORT_web_port" }}
MEDIA_UPLOAD_DIRECTORY=/app/static/media
SEARCH_INDEX=/app/search_index
diff --git a/app/deployment/plume.hcl b/app/deployment/plume.hcl
index 88110da..9010570 100644
--- a/app/deployment/plume.hcl
+++ b/app/deployment/plume.hcl
@@ -9,11 +9,17 @@ job "plume" {
group "plume" {
count = 1
+
+ network {
+ port "web_port" { }
+ }
+
task "plume" {
driver = "docker"
config {
image = "superboum/plume:v1"
network_mode = "host"
+ ports = [ "web_port" ]
#command = "cat"
#args = [ "/dev/stdout" ]
volumes = [
@@ -22,13 +28,8 @@ job "plume" {
]
}
- artifact {
- source = "http://127.0.0.1:8500/v1/kv/configuration/plume/app.env?raw"
- destination = "secrets/app.env.tpl"
- mode = "file"
- }
template {
- source = "secrets/app.env.tpl"
+ data = file("../config/configuration/plume/app.env")
destination = "secrets/app.env"
env = true
}
@@ -36,9 +37,6 @@ job "plume" {
resources {
memory = 100
cpu = 100
- network {
- port "web_port" {}
- }
}
service {
@@ -49,12 +47,11 @@ job "plume" {
"traefik.frontend.entryPoints=https,http",
"traefik.frontend.rule=Host:plume.deuxfleurs.fr",
]
- port = 7878
- address_mode = "driver"
+ port = "web_port"
+ address_mode = "host"
check {
type = "tcp"
- port = 7878
- address_mode = "driver"
+ port = "web_port"
interval = "60s"
timeout = "5s"
check_restart {