83 lines
1.9 KiB
HCL
83 lines
1.9 KiB
HCL
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`)",
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |