Skip to content

Commit bb73de3

Browse files
committed
Deploy scripts for relay rewards on AO
1 parent c535b6c commit bb73de3

3 files changed

Lines changed: 150 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
job "deploy-relay-rewards-dev" {
2+
datacenters = [ "ator-fin" ]
3+
type = "batch"
4+
5+
reschedule { attempts = 0 }
6+
7+
task "deploy-relay-rewards-task" {
8+
driver = "docker"
9+
10+
restart {
11+
attempts = 0
12+
mode = "fail"
13+
}
14+
15+
resources {
16+
cpu = 4096
17+
memory = 4096
18+
}
19+
20+
config {
21+
network_mode = "host"
22+
image = "ghcr.io/anyone-protocol/smart-contracts-ao:0.0.1"
23+
entrypoint = ["npm"]
24+
command = "run"
25+
args = ["deploy"]
26+
}
27+
28+
vault { policies = [ "distribution-dev" ] }
29+
30+
env {
31+
PHASE = "dev"
32+
CONSUL_IP = "127.0.0.1"
33+
CONSUL_PORT = "8500"
34+
CONTRACT_NAME = "relay-rewards"
35+
CONTRACT_CONSUL_KEY = "smart-contracts/dev/relay-rewards-address"
36+
CONTRACT_SOURCE_CONSUL_KEY = "smart-contracts/dev/relay-rewards-source"
37+
}
38+
39+
template {
40+
destination = "secrets/file.env"
41+
env = true
42+
data = <<EOH
43+
{{with secret "kv/distribution/dev"}}
44+
DEPLOYER_PRIVATE_KEY="{{.Data.data.DISTRIBUTION_OWNER_KEY}}"
45+
CONSUL_TOKEN="{{.Data.data.CONSUL_TOKEN}}"
46+
{{end}}
47+
EOH
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
job "deploy-relay-rewards-live" {
2+
datacenters = [ "ator-fin" ]
3+
type = "batch"
4+
5+
reschedule { attempts = 0 }
6+
7+
task "deploy-relay-rewards-task" {
8+
driver = "docker"
9+
10+
restart {
11+
attempts = 0
12+
mode = "fail"
13+
}
14+
15+
resources {
16+
cpu = 4096
17+
memory = 4096
18+
}
19+
20+
config {
21+
network_mode = "host"
22+
image = "ghcr.io/anyone-protocol/smart-contracts-ao:0.0.1"
23+
entrypoint = ["npm"]
24+
command = "run"
25+
args = ["deploy"]
26+
}
27+
28+
vault { policies = [ "distribution-live" ] }
29+
30+
env {
31+
PHASE = "live"
32+
CONSUL_IP = "127.0.0.1"
33+
CONSUL_PORT = "8500"
34+
CONTRACT_NAME = "relay-rewards"
35+
CONTRACT_CONSUL_KEY = "smart-contracts/live/relay-rewards-address"
36+
CONTRACT_SOURCE_CONSUL_KEY = "smart-contracts/live/relay-rewards-source"
37+
}
38+
39+
template {
40+
destination = "secrets/file.env"
41+
env = true
42+
data = <<EOH
43+
{{with secret "kv/distribution/live"}}
44+
DEPLOYER_PRIVATE_KEY="{{.Data.data.DISTRIBUTION_OWNER_KEY}}"
45+
CONSUL_TOKEN="{{.Data.data.CONSUL_TOKEN}}"
46+
{{end}}
47+
EOH
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
job "deploy-relay-rewards-stage" {
2+
datacenters = [ "ator-fin" ]
3+
type = "batch"
4+
5+
reschedule { attempts = 0 }
6+
7+
task "deploy-relay-rewards-task" {
8+
driver = "docker"
9+
10+
restart {
11+
attempts = 0
12+
mode = "fail"
13+
}
14+
15+
resources {
16+
cpu = 4096
17+
memory = 4096
18+
}
19+
20+
config {
21+
network_mode = "host"
22+
image = "ghcr.io/anyone-protocol/smart-contracts-ao:stage"
23+
entrypoint = ["npm"]
24+
command = "run"
25+
args = ["deploy"]
26+
}
27+
28+
vault { policies = [ "distribution-stage" ] }
29+
30+
env {
31+
PHASE = "stage"
32+
CONSUL_IP = "127.0.0.1"
33+
CONSUL_PORT = "8500"
34+
CONTRACT_NAME = "relay-rewards"
35+
CONTRACT_CONSUL_KEY = "smart-contracts/stage/relay-rewards-address"
36+
CONTRACT_SOURCE_CONSUL_KEY = "smart-contracts/stage/relay-rewards-source"
37+
}
38+
39+
template {
40+
destination = "secrets/file.env"
41+
env = true
42+
data = <<EOH
43+
{{with secret "kv/distribution/stage"}}
44+
DEPLOYER_PRIVATE_KEY="{{.Data.data.DISTRIBUTION_OWNER_KEY}}"
45+
CONSUL_TOKEN="{{.Data.data.CONSUL_TOKEN}}"
46+
{{end}}
47+
EOH
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)