forked from iotaledger/wasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
waypoint.hcl
58 lines (52 loc) · 1.71 KB
/
waypoint.hcl
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
# The name of your project. A project typically maps 1:1 to a VCS repository.
# This name must be unique for your Waypoint server. If you're running in
# local mode, this must be unique to your machine.
project = "iscp"
# Labels can be specified for organizational purposes.
labels = { "team" = "iscp" }
variable "adminWhitelist" {
type = list(string)
}
variable "ghcr" {
type = object({
username = string
password = string
server_address = string
})
}
# An application to deploy.
app "wasp-evm" {
# Build specifies how an application should be deployed. In this case,
# we'll build using a Dockerfile and keeping it in a local registry.
build {
use "docker" {
disable_entrypoint = true
buildkit = true
dockerfile = "./Dockerfile"
build_args = {
GOLANG_IMAGE_TAG = "1.17-buster"
BUILD_TAGS = "rocksdb,builtin_static"
BUILD_LD_FLAGS = "-X github.com/iotaledger/wasp/packages/wasp.VersionHash=${gitrefhash()}"
}
}
registry {
use "docker" {
image = "ghcr.io/luke-thorne/wasp"
tag = gitrefpretty()
encoded_auth = base64encode(jsonencode(var.ghcr))
}
}
}
# Deploy to Nomad
deploy {
use "nomad-jobspec" {
// Templated to perhaps bring in the artifact from a previous
// build/registry, entrypoint env vars, etc.
jobspec = templatefile("${path.app}/wasp.nomad.tpl", {
artifact = artifact
adminWhitelist = jsonencode(var.adminWhitelist)
auth = var.ghcr
})
}
}
}