From 8b33e2b0a26b606635be8608c4e4e769348b0719 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 18:41:27 +0100 Subject: [PATCH 1/9] changed image and mapped ports to 3000 --- jobs/nginx/anime-manga-soc.hcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index bc5c6bc..8340bf7 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -8,11 +8,13 @@ job "nginx-ams" { network { port "http" { - to = "80" + static = 80 + to = 3000 } port "https" { - to = "443" + static = 443 + to = 3000 } } @@ -37,7 +39,7 @@ job "nginx-ams" { driver = "docker" config { - image = "ghcr.io/dcuams/amikon-website" + image = "ghcr.io/dcuams/amikon-website-v2" ports = ["http", "https"] } } From 7f579e9a9d45ddd85349f0544f927761577dd939 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:01:22 +0100 Subject: [PATCH 2/9] added traefik map to 3000 --- jobs/nginx/anime-manga-soc.hcl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index 8340bf7..32d0d7c 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -8,12 +8,10 @@ job "nginx-ams" { network { port "http" { - static = 80 to = 3000 } port "https" { - static = 443 to = 3000 } } @@ -32,6 +30,7 @@ job "nginx-ams" { "traefik.http.routers.nginx-ams.rule=Host(`amikon.me`,`www.amikon.me`)", "traefik.http.routers.nginx-ams.entrypoints=web,websecure", "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt" + "traefik.http.routers.nginx-ams.loadbalancer.server.port=${NOMAD_PORT_http}" ] } From 68e85d1d867ff51c4f765aa88018643f7959b84c Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:02:27 +0100 Subject: [PATCH 3/9] oops --- jobs/nginx/anime-manga-soc.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index 32d0d7c..242a513 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -29,7 +29,7 @@ job "nginx-ams" { "traefik.enable=true", "traefik.http.routers.nginx-ams.rule=Host(`amikon.me`,`www.amikon.me`)", "traefik.http.routers.nginx-ams.entrypoints=web,websecure", - "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt" + "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt", "traefik.http.routers.nginx-ams.loadbalancer.server.port=${NOMAD_PORT_http}" ] } From a28ddc29ae7b5a2eb7502ea35ff64f462c1ea17e Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:06:17 +0100 Subject: [PATCH 4/9] oops --- jobs/nginx/anime-manga-soc.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index 242a513..2c1ea61 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -38,7 +38,7 @@ job "nginx-ams" { driver = "docker" config { - image = "ghcr.io/dcuams/amikon-website-v2" + image = "ghcr.io/dcuams/amikon-site-v2:latest" ports = ["http", "https"] } } From 013f39c7a83d534433561e4e05cc13a9cd1c06a5 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:16:06 +0100 Subject: [PATCH 5/9] added resource block because react ... --- jobs/nginx/anime-manga-soc.hcl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index 2c1ea61..b827003 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -30,7 +30,7 @@ job "nginx-ams" { "traefik.http.routers.nginx-ams.rule=Host(`amikon.me`,`www.amikon.me`)", "traefik.http.routers.nginx-ams.entrypoints=web,websecure", "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt", - "traefik.http.routers.nginx-ams.loadbalancer.server.port=${NOMAD_PORT_http}" + "traefik.http.routers.nginx-ams.loadbalancer.server.port=3000" ] } @@ -41,6 +41,11 @@ job "nginx-ams" { image = "ghcr.io/dcuams/amikon-site-v2:latest" ports = ["http", "https"] } + + resources { + cpu = 100 + memory = 500 + } } } } From ae1896f5ce48630232c04efea75490a78610fe08 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:24:43 +0100 Subject: [PATCH 6/9] added env var for dynamic port ? --- jobs/nginx/anime-manga-soc.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index b827003..ff554bf 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -30,7 +30,7 @@ job "nginx-ams" { "traefik.http.routers.nginx-ams.rule=Host(`amikon.me`,`www.amikon.me`)", "traefik.http.routers.nginx-ams.entrypoints=web,websecure", "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt", - "traefik.http.routers.nginx-ams.loadbalancer.server.port=3000" + "traefik.http.routers.nginx-ams.loadbalancer.server.port=${NOMAD_PORT_http}" ] } From b1b4a3ca0aa468c1153d105327ef21a9ff3f8eb7 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Thu, 5 Oct 2023 19:27:47 +0100 Subject: [PATCH 7/9] consul does dynamic port map, removed redundant traefik line --- jobs/nginx/anime-manga-soc.hcl | 1 - 1 file changed, 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index ff554bf..d90c3a1 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -30,7 +30,6 @@ job "nginx-ams" { "traefik.http.routers.nginx-ams.rule=Host(`amikon.me`,`www.amikon.me`)", "traefik.http.routers.nginx-ams.entrypoints=web,websecure", "traefik.http.routers.nginx-ams.tls.certresolver=lets-encrypt", - "traefik.http.routers.nginx-ams.loadbalancer.server.port=${NOMAD_PORT_http}" ] } From 1b5c5c97b860d80ddeb541d8188675f7dbf995eb Mon Sep 17 00:00:00 2001 From: leath-dub Date: Fri, 6 Oct 2023 12:49:02 +0100 Subject: [PATCH 8/9] removed redundant block --- jobs/nginx/anime-manga-soc.hcl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index d90c3a1..29a8b3c 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -10,10 +10,6 @@ job "nginx-ams" { port "http" { to = 3000 } - - port "https" { - to = 3000 - } } service { @@ -38,7 +34,7 @@ job "nginx-ams" { config { image = "ghcr.io/dcuams/amikon-site-v2:latest" - ports = ["http", "https"] + ports = "http" } resources { From 09f990067f9507d37a7b0e753dd7ed51e4a35640 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Fri, 6 Oct 2023 12:56:37 +0100 Subject: [PATCH 9/9] oops --- jobs/nginx/anime-manga-soc.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/nginx/anime-manga-soc.hcl b/jobs/nginx/anime-manga-soc.hcl index 29a8b3c..11c91b1 100644 --- a/jobs/nginx/anime-manga-soc.hcl +++ b/jobs/nginx/anime-manga-soc.hcl @@ -34,7 +34,7 @@ job "nginx-ams" { config { image = "ghcr.io/dcuams/amikon-site-v2:latest" - ports = "http" + ports = ["http"] } resources {