-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathmirror.nomad
More file actions
79 lines (68 loc) · 1.66 KB
/
mirror.nomad
File metadata and controls
79 lines (68 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
job "mirror" {
type = "system"
datacenters = ["VOID-MIRROR"]
namespace = "mirror"
group "services" {
network {
mode = "bridge"
port "http" { to = 80 }
port "rsync" {
to = 873
static = 873
}
}
volume "dist-mirror" {
type = "host"
source = "dist_mirror"
read_only = true
}
service {
name = "mirror-${meta.mirror_region}"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.mirror-${meta.mirror_region}.tls=true",
"traefik.http.routers.mirror-${meta.mirror_region}.rule=Host(`repo-${meta.mirror_region}.voidlinux.org`)",
]
}
task "nginx" {
driver = "docker"
config {
image = "ghcr.io/void-linux/infra-nginx:20220804RC02"
volumes = ["local/compat-layout.conf:/etc/nginx/locations.d/compat-layout.conf"]
}
volume_mount {
volume = "dist-mirror"
destination = "/srv/www"
}
template {
data = file("compat-layout.conf")
destination = "local/compat-layout.conf"
}
}
task "rsync" {
driver = "docker"
config {
image = "ghcr.io/void-linux/infra-rsync:v20210926rc01"
volumes = ["local/voidmirror.conf:/etc/rsyncd.conf.d/voidmirror.conf"]
}
volume_mount {
volume = "dist-mirror"
destination = "/srv/rsync"
}
template {
data = <<EOF
[voidlinux]
comment = Main Void Repository
path = /srv/rsync
read only = yes
list = yes
transfer logging = true
timeout = 600
exclude = - .* - *-repodata.* - *-stagedata.*
EOF
destination = "local/voidmirror.conf"
}
}
}
}