nomad to the max
This commit is contained in:
83
apps/gitea/live.hcl
Normal file
83
apps/gitea/live.hcl
Normal file
@@ -0,0 +1,83 @@
|
||||
job "gitea" {
|
||||
datacenters = [
|
||||
"nummer5",
|
||||
]
|
||||
type = "service"
|
||||
|
||||
group "gitea" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 3000
|
||||
}
|
||||
|
||||
port "ssh" {
|
||||
static = 2222
|
||||
to = 22
|
||||
}
|
||||
}
|
||||
|
||||
volume "gitea-data" {
|
||||
type = "csi"
|
||||
source = "gitea-data"
|
||||
read_only = false
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
restart {
|
||||
attempts = 5
|
||||
delay = "30s"
|
||||
}
|
||||
|
||||
task "gitea" {
|
||||
driver = "podman"
|
||||
volume_mount {
|
||||
volume = "gitea-data"
|
||||
destination = "/data"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
config {
|
||||
image = "docker.io/gitea/gitea:latest"
|
||||
ports = ["ssh", "http"]
|
||||
}
|
||||
|
||||
env {
|
||||
APP_NAME = "Gitea: Git with a cup of tea"
|
||||
RUN_MODE = "prod"
|
||||
SSH_DOMAIN = "consul"
|
||||
SSH_PORT = "2222"
|
||||
ROOT_URL = "http://gitea.service.consul"
|
||||
TZ = "Europe/Berlin"
|
||||
USER_UID = "1000"
|
||||
USER_GID = "1000"
|
||||
DB_TYPE = "postgres"
|
||||
DB_HOST = "postgres.service.consul"
|
||||
DB_USER = "gitea"
|
||||
DB_PASSWORD = "giteaEu94XSS4gKpheSBoMsIs"
|
||||
GITEA__lfs__PATH = "/data/git/lfs"
|
||||
GITEA__server__START_SSH_SERVER = "true"
|
||||
GITEA__packages__ENABLED = "true"
|
||||
GITEA__log__LEVEL = "warn"
|
||||
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 200
|
||||
memory = 512
|
||||
}
|
||||
|
||||
service {
|
||||
name = "gitea"
|
||||
port = "http"
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.gitea.rule=Host(`gitea.service.consul`)",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
apps/gitea/volume.hcl
Normal file
21
apps/gitea/volume.hcl
Normal file
@@ -0,0 +1,21 @@
|
||||
type = "csi"
|
||||
id = "gitea-data"
|
||||
name = "gitea-data"
|
||||
plugin_id = "nfs"
|
||||
external_id = "gitea-data"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context {
|
||||
server = "ebin02.wks"
|
||||
share = "/data/raid1-ssd/app-data/gitea-data"
|
||||
mountPermissions = "0"
|
||||
}
|
||||
|
||||
mount_options {
|
||||
fs_type = "nfs"
|
||||
mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ]
|
||||
}
|
||||
Reference in New Issue
Block a user