feat(dev): Add development build workflows and Nomad job

This commit is contained in:
2026-02-24 08:54:03 -08:00
parent 7099577f92
commit e47af2c839
3 changed files with 174 additions and 0 deletions

59
foodplanner-dev.nomad Normal file
View File

@@ -0,0 +1,59 @@
variable "container_version" {
default = "dev"
}
job "foodplanner-dev" {
datacenters = ["dc1"]
type = "service"
group "app" {
count = 1
network {
port "http" {
to = 8999
}
}
service {
name = "foodplanner-dev"
port = "http"
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
task "app" {
driver = "docker"
config {
image = "ghcr.io/sstent/foodplanner:${var.container_version}"
ports = ["http"]
}
env {
DATABASE_URL = "postgresql://postgres:postgres@master.postgres.service.dc1.consul/meal_planner_dev"
}
resources {
cpu = 500
memory = 1024
}
# Restart policy
restart {
attempts = 3
interval = "10m"
delay = "15s"
mode = "fail"
}
}
}
}