job "salience-editor-api" { datacenters = ["ord10"] type = "service" constraint { attribute = "${node.unique.name}" value = "chicago-web01" } group "app" { count = 1 network { mode = "host" port "http" { # Nomad will assign an available port } } update { max_parallel = 1 health_check = "checks" min_healthy_time = "10s" healthy_deadline = "5m" auto_promote = true auto_revert = true canary = 1 } task "gunicorn-server" { driver = "raw_exec" user = "peoplesgrocers" config { work_dir = "$RELEASE_PATH" command = "/home/peoplesgrocers/.local/bin/uv" # You can add --log-level debug to gunicorn args = ["run", "gunicorn", "--preload", "--workers", "3", "--bind", "127.0.0.1:${NOMAD_PORT_http}", "--timeout", "300", "salience:app"] } env { PORT = "${NOMAD_PORT_http}" ORIGIN = "https://peoplesgrocers.com" #PATH = "/home/peoplesgrocers/.local/bin:/usr/local/bin:/usr/bin:/bin" HOME = "/home/peoplesgrocers" UV_CACHE_DIR = "/home/peoplesgrocers/.cache/uv" HF_HOME = "/home/peoplesgrocers/cache-huggingface" NLTK_DATA = "/home/peoplesgrocers/cache-nltk" } # Release path set during deployment via envsubst template { data = <