From a49abb13be8a5534440d03150fe671d3411d92f7 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Tue, 10 Dec 2024 23:24:40 +0000 Subject: [PATCH] amikon: update to support node docker image --- jobs/socs/ams-amikon.hcl | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/jobs/socs/ams-amikon.hcl b/jobs/socs/ams-amikon.hcl index ae8b041..294aa54 100644 --- a/jobs/socs/ams-amikon.hcl +++ b/jobs/socs/ams-amikon.hcl @@ -12,7 +12,7 @@ job "ams-amikon" { network { port "http" { - to = 80 + to = 3000 } } @@ -20,35 +20,45 @@ job "ams-amikon" { port = "http" check { - type = "http" - path = "/" + type = "http" + path = "/" interval = "10s" - timeout = "2s" + timeout = "2s" } tags = [ "traefik.enable=true", "traefik.http.routers.ams-amikon.rule=Host(`amikon.me`) || Host(`www.amikon.me`)", "traefik.http.routers.ams-amikon.entrypoints=web,websecure", "traefik.http.routers.ams-amikon.tls.certresolver=lets-encrypt", - "traefik.http.routers.ams-amikon.middlewares=www-redirect", - "traefik.http.middlewares.www-redirect.redirectregex.regex=^https?://www.amikon.me/(.*)", - "traefik.http.middlewares.www-redirect.redirectregex.replacement=https://amikon.me/$${1}", - "traefik.http.middlewares.www-redirect.redirectregex.permanent=true", + "traefik.http.routers.ams-amikon.middlewares=amikon-www-redirect", + "traefik.http.middlewares.amikon-www-redirect.redirectregex.regex=^https?://www.amikon.me/(.*)", + "traefik.http.middlewares.amikon-www-redirect.redirectregex.replacement=https://amikon.me/$${1}", + "traefik.http.middlewares.amikon-www-redirect.redirectregex.permanent=true", ] } - task "amikon-nginx" { + task "amikon-node" { driver = "docker" config { - image = "ghcr.io/dcuams/amikon-site-v2:latest" + image = "ghcr.io/dcuams/amikon-site-v2:latest" force_pull = true - ports = ["http"] + ports = ["http"] + } + + template { + data = <