adriano.fyi/job.nomad.hcl

56 lines
1 KiB
HCL
Raw Normal View History

2023-01-07 16:52:53 +00:00
variable "version" {
type = string
}
2023-04-17 16:23:34 +00:00
variable "secret_access_key" {
type = string
}
2023-01-07 16:52:53 +00:00
job "adriano.fyi" {
datacenters = ["dc1"]
2025-04-18 01:34:50 +00:00
namespace = "default"
2023-01-07 16:52:53 +00:00
group "task" {
2023-09-09 10:28:32 +00:00
count = 2
2023-01-07 16:52:53 +00:00
network {
port "http" {
2025-04-18 01:34:50 +00:00
to = 3000
host_network = "tailnet"
2023-01-07 16:52:53 +00:00
}
}
task "webserver" {
2025-04-18 01:34:50 +00:00
driver = "podman"
2023-01-07 16:52:53 +00:00
artifact {
source = "s3://us-east-1.linodeobjects.com/adriano-fyi-static-site/adriano_fyi-${var.version}.tar"
options {
2023-04-17 16:23:34 +00:00
aws_access_key_id = "6P583LDF5TH38MV4D1Y1"
aws_access_key_secret = var.secret_access_key
2023-01-07 16:52:53 +00:00
# Leave the archive in tar format
archive = false
}
}
config {
2025-04-18 01:34:50 +00:00
load = "adriano_fyi-${var.version}.tar"
2023-01-07 16:52:53 +00:00
image = "adriano_fyi:${var.version}"
ports = ["http"]
}
resources {
2025-04-18 01:34:50 +00:00
cpu = 128
2023-01-07 19:19:30 +00:00
memory = 128
2023-01-07 16:52:53 +00:00
}
service {
2025-04-18 01:34:50 +00:00
port = "http"
name = "adriano-fyi"
provider = "nomad"
address_mode = "host"
2023-01-07 16:52:53 +00:00
}
}
}
}