Nomploy Nomad Packs

← All packs

onedev v0.1.0

Dev tools

OneDev — an all-in-one, self-hosted Git server with built-in CI/CD, code search, packages and Kanban boards. Uses an embedded database, so no external DB is needed. Deployed as a single host-networked Nomad service.

nomad-pack run onedev --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- onedev

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

2 tasks http 6610ssh 6611 1 volume image 1dev/server:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run onedev -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "onedev"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The OneDev container image. Pin a tag in production.
image = "1dev/server:latest"

# Host port for the OneDev web UI / HTTP git.
port = 6610

# Port for git-over-SSH.
ssh_port = 6611

# Named volume mounted at /opt/onedev — repositories, the embedded database and config.
data_volume = "onedev_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 1500
    memory = 2048
  }
NameTypeDefaultDescription
job_name string
"onedev"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"1dev/server:latest"
The OneDev container image. Pin a tag in production.
port number
6610
Host port for the OneDev web UI / HTTP git.
ssh_port number
6611
Port for git-over-SSH.
data_volume string
"onedev_data"
Named volume mounted at /opt/onedev — repositories, the embedded database and config.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1500
    memory = 2048
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: onedev_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/onedev_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/onedev_data/_data backup:<bucket>/onedev_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

onedev

OneDev — an all-in-one, self-hosted Git server with built-in CI/CD, code search & navigation, pull requests, packages and Kanban boards. Unlike some forges it needs no separate CI runner to get started and uses an embedded database, so a single container gives you a full development platform.

Single host-networked Nomad service with a persistent data volume.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run onedev --registry=nomploy

Configure

Variable Default Description
port 6610 Web UI / HTTP-git port (OneDev's default).
ssh_port 6611 git-over-SSH port (OneDev's default).
image 1dev/server:latest Container image. Pin a tag in production.
data_volume onedev_data /opt/onedev — repositories, embedded DB and config.
resources { cpu = 1500, memory = 2048 } Task resources. The JVM needs headroom.

On first launch, complete the setup wizard (create the admin account, set the server URL). The default ports match OneDev's built-ins; a prestart init task makes the data volume writable. For CI builds on the same host, add a Docker executor by mounting /var/run/docker.sock into the task. Pin the job to the node holding the volume with constraints.