Moved nomad data files

This commit is contained in:
marc
2025-03-24 22:59:34 +01:00
parent 411bf5b0f2
commit e24078ec81
9 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
job "cua-quinto" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "cua-quinto" {
count = 1
restart {
attempts = 5
delay = "15s"
}
network {
port "http" {
to = 80
}
}
# CUA-QUINTO APP
task "cua-quinto" {
driver = "docker"
env {
API_PREFIX = "/cua-quinto"
API_SCHEME = "https"
}
config {
image = "marc.sastre.cat/quinto-cua:latest"
ports = ["http"]
}
resources {
cpu = 50
memory = 64
}
service {
name = "cua-quinto"
port = "http"
}
}
}
}

106
data/nomad/old/lwt.nomad Normal file
View File

@@ -0,0 +1,106 @@
job "lwt" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "lwt" {
count = 1
restart {
attempts = 10
delay = "30s"
}
# VOLUMES
volume "lwt-mariadb" {
type = "host"
read_only = false
source = "lwt-mariadb"
}
volume "lwt" {
type = "host"
read_only = false
source = "lwt"
}
# NETWORK
network {
port "lwt" {
to = 80
}
port "mariadb" {
static = 33306
to = 3306
}
}
# TASKS
task "mariadb" {
driver = "docker"
user = 1001
volume_mount {
volume = "lwt-mariadb"
destination = "/var/lib/mysql"
read_only = false
}
env {
MYSQL_ALLOW_EMPTY_PASSWORD = "no"
MYSQL_ROOT_PASSWORD = "root"
}
config {
image = "mariadb:10.7"
ports = ["mariadb"]
}
resources {
cpu = 100
memory = 128
}
}
task "lwt" {
driver = "docker"
config {
image = "ghcr.io/hugofara/lwt:master"
ports = ["lwt"]
}
volume_mount {
volume = "lwt"
destination = "/var/www/html/media"
read_only = false
}
env {
DB_HOST = "${attr.unique.network.ip-address}:33306" # "100.91.225.117"
}
resources {
cpu = 100
memory = 128
}
service {
name = "lwt"
port = "lwt"
check {
type = "tcp"
port = "lwt"
interval = "30s"
timeout = "10s"
}
}
}
}
}

View File

@@ -0,0 +1,71 @@
job "minecraft" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "minecraft" {
count = 1
volume "minecraft" {
type = "host"
read_only = false
source = "minecraft"
}
restart {
attempts = 2
interval = "2m"
delay = "1m"
mode = "fail"
}
network {
port "server" {
static = 25565
to = 25565
host_network = "minecraft"
}
}
###
# MINECRAFT SERVER
###
task "minecraft" {
driver = "docker"
volume_mount {
volume = "minecraft"
destination = "/data"
read_only = false
}
env {
EULA = "TRUE"
TZ = "Europe/Madrid"
}
config {
image = "itzg/minecraft-server"
ports = ["server"]
}
resources {
cpu = 2800
memory = 1900
}
service {
name = "minecraft"
check {
type = "tcp"
port = "server"
interval = "30s"
timeout = "2s"
}
}
}
}
}

View File

@@ -0,0 +1,133 @@
job "moimoin" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "moimoin" {
count = 1
restart {
attempts = 10
delay = "30s"
}
# VOLUMES
volume "mysql" {
type = "host"
read_only = false
source = "moimoin"
}
# NETWORK
network {
port "moimoin-front" {
to = 5000
}
port "moimoin-back" {
to = 3000
}
port "mysql" {
static = 33306
to = 3306
}
}
# TASKS
task "mysql" {
driver = "docker"
user = 1001
volume_mount {
volume = "mysql"
destination = "/var/lib/mysql"
read_only = false
}
env {
MYSQL_DATABASE = "xat-osr"
MYSQL_ROOT_PASSWORD = "estrell4galicia"
}
config {
image = "arm64v8/mysql:latest"
ports = ["mysql"]
}
resources {
cpu = 500
memory = 512
}
}
task "moimoin-back" {
driver = "docker"
config {
image = "marc.sastre.cat/moimoin-back:latest"
ports = ["moimoin-back"]
}
env {
MYSQL_HOST = "${attr.unique.network.ip-address}" # "100.91.225.117"
MYSQL_PORT = "33306"
MYSQL_USER = "root"
MYSQL_PASSWORD = "estrell4galicia"
MYSQL_NAME = "xat-osr"
CHAT_ADMIN_PSWD = "cervesaEspecial"
CLIENT_HOST = "marc.sastre.cat/moimoin"
}
resources {
cpu = 100
memory = 128
}
service {
name = "moimoin-back"
port = "moimoin-back"
check {
type = "tcp"
port = "moimoin-back"
interval = "30s"
timeout = "10s"
}
}
}
task "moimoin-front" {
driver = "docker"
config {
image = "marc.sastre.cat/moimoin-front:latest"
ports = ["moimoin-front"]
}
env {
CLIENT_PORT = "5000"
}
resources {
cpu = 100
memory = 128
}
service {
name = "moimoin-front"
port = "moimoin-front"
check {
type = "tcp"
port = "moimoin-front"
interval = "30s"
timeout = "10s"
}
}
}
}
}

View File

@@ -0,0 +1,52 @@
job "organice" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "organice" {
count = 1
restart {
attempts = 5
delay = "1m"
}
network {
port "http" {
to = 5000
}
}
task "organice" {
driver = "docker"
env {
ORGANICE_WEBDAV_URL = "https://nextcloud.lajuntament.space/remote.php/dav/files/marc/"
}
config {
image = "twohundredok/organice:latest"
ports = ["http"]
}
resources {
cpu = 100
memory = 128
}
service {
name = "organice"
port = "http"
check {
type = "tcp"
port = "http"
interval = "30s"
timeout = "2s"
}
}
}
}
}

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"
}
}
}
}

View File

@@ -0,0 +1,41 @@
job "presencia" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "presencia" {
count = 1
restart {
attempts = 5
delay = "15s"
}
network {
port "http" {
to = 5000
}
}
# PRESENCIA APP
task "presencia" {
driver = "docker"
config {
image = "marc.sastre.cat/presencia"
ports = ["http"]
}
resources {
cpu = 50
memory = 64
}
service {
name = "presencia"
port = "http"
}
}
}
}

View File

@@ -0,0 +1,52 @@
job "webhooks" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "webhooks" {
count = 1
restart {
attempts = 5
delay = "1m"
}
network {
port "http" {
to = 6000
}
}
task "webhooks" {
driver = "docker"
env {
CONFIG_FILE = "/app/data/config.json"
}
config {
image = "marc.sastre.cat/webhooks:latest"
ports = ["http"]
volumes = ["/mnt/vatnajokull/nomad_volumes/webhooks:/app/data"]
}
resources {
cpu = 100
memory = 128
}
service {
name = "webhooks"
port = "http"
check {
type = "tcp"
port = "http"
interval = "30s"
timeout = "2s"
}
}
}
}
}