Run hclfmt
This commit is contained in:
parent
f86d86716e
commit
a095dfb958
@ -1,53 +1,53 @@
|
|||||||
job "site" {
|
job "site" {
|
||||||
region = "global"
|
region = "global"
|
||||||
datacenters = ["dc1"]
|
datacenters = ["dc1"]
|
||||||
type = "service"
|
type = "service"
|
||||||
|
|
||||||
group "site" {
|
group "site" {
|
||||||
count = 2
|
count = 2
|
||||||
|
|
||||||
network {
|
network {
|
||||||
port "nginx" {
|
port "nginx" {
|
||||||
to = 80
|
to = 80
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task "nginx" {
|
task "nginx" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
|
|
||||||
env {
|
|
||||||
// Hack to force Nomad to re-deploy the service
|
|
||||||
// instead of ignoring it
|
|
||||||
COMMIT_SHA = "${DRONE_COMMIT_SHA}"
|
|
||||||
}
|
|
||||||
|
|
||||||
config {
|
env {
|
||||||
image = "nginx:latest"
|
// Hack to force Nomad to re-deploy the service
|
||||||
ports = ["nginx"]
|
// instead of ignoring it
|
||||||
volumes = ["local/site/public:/usr/share/nginx/html:ro"]
|
COMMIT_SHA = "${DRONE_COMMIT_SHA}"
|
||||||
}
|
}
|
||||||
|
|
||||||
artifact {
|
|
||||||
source = "https://api.minio.arsenm.dev/site/site.tar.gz"
|
|
||||||
destination = "local/site"
|
|
||||||
}
|
|
||||||
|
|
||||||
service {
|
config {
|
||||||
name = "site"
|
image = "nginx:latest"
|
||||||
port = "nginx"
|
ports = ["nginx"]
|
||||||
|
volumes = ["local/site/public:/usr/share/nginx/html:ro"]
|
||||||
|
}
|
||||||
|
|
||||||
tags = [
|
artifact {
|
||||||
"traefik.enable=true",
|
source = "https://api.minio.arsenm.dev/site/site.tar.gz"
|
||||||
|
destination = "local/site"
|
||||||
|
}
|
||||||
|
|
||||||
"traefik.http.middlewares.site-redir.redirectRegex.regex=^https://arsenm\\.dev",
|
service {
|
||||||
"traefik.http.middlewares.site-redir.redirectRegex.replacement=https://www.arsenm.dev",
|
name = "site"
|
||||||
"traefik.http.middlewares.site-redir.redirectRegex.permanent=true",
|
port = "nginx"
|
||||||
|
|
||||||
"traefik.http.routers.site.rule=Host(`arsenm.dev`) || Host(`www.arsenm.dev`)",
|
tags = [
|
||||||
"traefik.http.routers.site.middlewares=site-redir",
|
"traefik.enable=true",
|
||||||
"traefik.http.routers.site.tls.certResolver=letsencrypt",
|
|
||||||
]
|
"traefik.http.middlewares.site-redir.redirectRegex.regex=^https://arsenm\\.dev",
|
||||||
}
|
"traefik.http.middlewares.site-redir.redirectRegex.replacement=https://www.arsenm.dev",
|
||||||
}
|
"traefik.http.middlewares.site-redir.redirectRegex.permanent=true",
|
||||||
}
|
|
||||||
|
"traefik.http.routers.site.rule=Host(`arsenm.dev`) || Host(`www.arsenm.dev`)",
|
||||||
|
"traefik.http.routers.site.middlewares=site-redir",
|
||||||
|
"traefik.http.routers.site.tls.certResolver=letsencrypt",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user