Initial Commit
This commit is contained in:
7
gitea/README.md
Normal file
7
gitea/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Gitea
|
||||
|
||||
This is the nomad file for [Gitea](https://github.com/go-gitea/gitea), a git web interface.
|
||||
|
||||
This job requires one volume for Gitea's data. This volume should be called `gitea-data` and should be read/write, not readonly. Set the owner of the directory bound to the volume as `1002`. The command that would be used for this is `sudo chown 1002:1002 <volume directory>`.
|
||||
|
||||
In the `env` stanza, there is an SSH domain. Set that to the local IP of your server so that you can use it to upload to git via SSH.
|
||||
74
gitea/gitea.nomad
Normal file
74
gitea/gitea.nomad
Normal file
@@ -0,0 +1,74 @@
|
||||
job "gitea" {
|
||||
region = "global"
|
||||
datacenters = [
|
||||
"dc1",
|
||||
]
|
||||
type = "service"
|
||||
|
||||
group "gitea" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 3000
|
||||
}
|
||||
|
||||
port "ssh" {
|
||||
static = 2222
|
||||
to = 22
|
||||
}
|
||||
}
|
||||
|
||||
volume "gitea-data" {
|
||||
type = "host"
|
||||
source = "gitea-data"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
restart {
|
||||
attempts = 5
|
||||
delay = "30s"
|
||||
}
|
||||
|
||||
task "app" {
|
||||
driver = "docker"
|
||||
volume_mount {
|
||||
volume = "gitea-data"
|
||||
destination = "/data"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
config {
|
||||
image = "gitea/gitea:latest"
|
||||
ports = ["ssh", "http"]
|
||||
}
|
||||
|
||||
env {
|
||||
APP_NAME = "Gitea: Git with a cup of tea"
|
||||
RUN_MODE = "prod"
|
||||
SSH_DOMAIN = "CHANGE ME"
|
||||
SSH_PORT = "$NOMAD_PORT_ssh"
|
||||
ROOT_URL = "https://gitea.arsenm.dev/"
|
||||
USER_UID = "1002"
|
||||
USER_GID = "1002"
|
||||
GITEA__server__START_SSH_SERVER = "true"
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 200
|
||||
memory = 512
|
||||
}
|
||||
|
||||
service {
|
||||
name = "gitea"
|
||||
port = "http"
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.gitea.rule=Host(`gitea.arsenm.dev`)",
|
||||
"traefik.http.routers.gitea.tls.certResolver=letsencrypt"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user