Last active
February 12, 2020 15:16
-
-
Save veverkap/e90ea33256e74542a27bd874b296a6d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "dockerregistry" { | |
datacenters = ["alpha"] | |
type = "service" | |
group "dockerregistry" { | |
# I only want one of these running at a time | |
count = 1 | |
task "dockerregistry" { | |
# gotta use the docker driver | |
driver = "docker" | |
config { | |
image = "registry:2" | |
network_mode = "bridge" | |
# I mount the dockerregistry folder to /var/lib/registry | |
# so that I can persist the images on my NAS through | |
# deploys and restarts | |
volumes = [ | |
"/mnt/configs/dockerregistry:/var/lib/registry" | |
] | |
port_map { | |
dockerregistry = 5000 | |
} | |
labels {} | |
} | |
resources { | |
cpu = 500 # 500 MHz | |
memory = 1024 # 1G | |
network { | |
mbits = 100 | |
port "dockerregistry"{} | |
} | |
} | |
service { | |
name = "dockerregistry" | |
port = "dockerregistry" | |
check { | |
name = "alive" | |
type = "tcp" | |
interval = "10s" | |
timeout = "2s" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment