amikon: update to support node docker image (#81)

This commit is contained in:
wizzdom 2024-12-10 23:27:40 +00:00 committed by GitHub
parent f3e5ae5e2b
commit 37e6facab6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ job "ams-amikon" {
network { network {
port "http" { port "http" {
to = 80 to = 3000
} }
} }
@ -30,14 +30,14 @@ job "ams-amikon" {
"traefik.http.routers.ams-amikon.rule=Host(`amikon.me`) || Host(`www.amikon.me`)", "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.entrypoints=web,websecure",
"traefik.http.routers.ams-amikon.tls.certresolver=lets-encrypt", "traefik.http.routers.ams-amikon.tls.certresolver=lets-encrypt",
"traefik.http.routers.ams-amikon.middlewares=www-redirect", "traefik.http.routers.ams-amikon.middlewares=amikon-www-redirect",
"traefik.http.middlewares.www-redirect.redirectregex.regex=^https?://www.amikon.me/(.*)", "traefik.http.middlewares.amikon-www-redirect.redirectregex.regex=^https?://www.amikon.me/(.*)",
"traefik.http.middlewares.www-redirect.redirectregex.replacement=https://amikon.me/$${1}", "traefik.http.middlewares.amikon-www-redirect.redirectregex.replacement=https://amikon.me/$${1}",
"traefik.http.middlewares.www-redirect.redirectregex.permanent=true", "traefik.http.middlewares.amikon-www-redirect.redirectregex.permanent=true",
] ]
} }
task "amikon-nginx" { task "amikon-node" {
driver = "docker" driver = "docker"
config { config {
@ -46,9 +46,19 @@ job "ams-amikon" {
ports = ["http"] ports = ["http"]
} }
template {
data = <<EOF
EMAIL={{ key "ams/amikon/email/user" }}
EMAIL_PASS={{ key "ams/amikon/email/password" }}
TO_EMAIL={{ key "ams/amikon/email/to" }}
EOF
destination = ".env"
env = true
}
resources { resources {
cpu = 100 cpu = 800
memory = 50 memory = 500
} }
} }
} }