Skip to content

Instantly share code, notes, and snippets.

@Neutrollized
Last active January 31, 2023 16:20
Show Gist options
  • Save Neutrollized/7d92a891a9cbd75c980e7658f587e967 to your computer and use it in GitHub Desktop.
Save Neutrollized/7d92a891a9cbd75c980e7658f587e967 to your computer and use it in GitHub Desktop.
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "spring-backend" {
datacenters = ["gcp-test"]
priority = 80
group "spring-backend" {
network {
port "api" { static = 8081 }
}
task "spring-backend" {
driver = "java"
config {
jar_path = "rest-0.0.1-SNAPSHOT.jar"
jvm_options = ["-Xmx512M", "-Xms512M"]
args = ["--server.port=${NOMAD_PORT_api}"]
}
resources {
cpu = 500
memory = 640
}
artifact {
source = "https://storage.googleapis.com/public-file-server/rest-0.0.1-SNAPSHOT.jar"
mode = "file"
destination = "rest-0.0.1-SNAPSHOT.jar"
}
service {
name = "spring-backend"
provider = "nomad"
port = "api"
tags = ["spring", "backend"]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment