Thingvellir as nomad server

This commit is contained in:
marc
2024-02-16 18:21:24 +01:00
parent 3c23709394
commit 87a4d79c71
27 changed files with 1253 additions and 18 deletions

70
data/nomad/pasta.nomad Normal file
View File

@@ -0,0 +1,70 @@
job "pasta" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "pasta" {
count = 1
restart {
attempts = 5
delay = "15s"
}
network {
port "backend" {
to = 3000
}
port "client" {
to = 80
}
}
# PASTA SERVER
task "pasta-server" {
driver = "docker"
env {
PASTA_PORT = "3000"
PASTA_DIR = "/pasta"
}
config {
image = "marc.sastre.cat/pasta-server"
ports = ["backend"]
volumes = ["/mnt/vatnajokull/nomad_volumes/pasta:/pasta"]
}
resources {
cpu = 100
memory = 256
}
service {
name = "pasta-server"
port = "backend"
}
}
# PASTA CLIENT
task "pasta-client" {
driver = "docker"
config {
image = "marc.sastre.cat/pasta-client"
ports = ["client"]
}
resources {
cpu = 50
memory = 32
}
service {
name = "pasta-client"
port = "client"
}
}
}
}