-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1309 from iotaledger/deposit-withdraw-frontends
add configs for waypoint to deploy frontends
- Loading branch information
Showing
8 changed files
with
221 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
job "isc-evm-withdraw-${workspace}" { | ||
datacenters = ["hcloud"] | ||
group "web" { | ||
ephemeral_disk { | ||
migrate = false | ||
sticky = true | ||
} | ||
|
||
network { | ||
port "http" { | ||
host_network = "private" | ||
to = 80 | ||
} | ||
} | ||
|
||
task "worker" { | ||
driver = "docker" | ||
config { | ||
image = "${artifact.image}:${artifact.tag}" | ||
ports = [ | ||
"http", | ||
] | ||
auth { | ||
username = "${auth.username}" | ||
password = "${auth.password}" | ||
server_address = "${auth.server_address}" | ||
} | ||
} | ||
|
||
env { | ||
%{ for k,v in entrypoint.env ~} | ||
${k} = "${v}" | ||
%{ endfor ~} | ||
|
||
// Ensure we set PORT for the URL service. This is only necessary | ||
// if we want the URL service to function. | ||
PORT = "$${NOMAD_ALLOC_PORT_http}" | ||
} | ||
|
||
service { | ||
tags = ["http"] | ||
port = "http" | ||
check { | ||
type = "http" | ||
port = "http" | ||
path = "/" | ||
interval = "5s" | ||
timeout = "2s" | ||
} | ||
} | ||
|
||
resources { | ||
memory = 256 | ||
cpu = 256 | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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 = "isc" | ||
|
||
# Labels can be specified for organizational purposes. | ||
labels = { "team" = "isc" } | ||
|
||
variable "ghcr" { | ||
type = object({ | ||
username = string | ||
password = string | ||
server_address = string | ||
}) | ||
} | ||
|
||
app "evm-withdraw" { | ||
build { | ||
use "docker" { | ||
disable_entrypoint = false | ||
buildkit = true | ||
dockerfile = "./Dockerfile" | ||
} | ||
|
||
registry { | ||
use "docker" { | ||
image = "ghcr.io/luke-thorne/evm_withdraw_frontend" | ||
tag = gitrefpretty() | ||
encoded_auth = base64encode(jsonencode(var.ghcr)) | ||
} | ||
} | ||
} | ||
|
||
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-evm-withdraw.nomad.tpl", { | ||
artifact = artifact | ||
auth = var.ghcr | ||
workspace = workspace.name | ||
}) | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
job "isc-evm-deposit-${workspace}" { | ||
datacenters = ["hcloud"] | ||
group "web" { | ||
ephemeral_disk { | ||
migrate = false | ||
sticky = true | ||
} | ||
|
||
network { | ||
port "http" { | ||
host_network = "private" | ||
to = 80 | ||
} | ||
} | ||
|
||
task "worker" { | ||
driver = "docker" | ||
config { | ||
image = "${artifact.image}:${artifact.tag}" | ||
ports = [ | ||
"http", | ||
] | ||
auth { | ||
username = "${auth.username}" | ||
password = "${auth.password}" | ||
server_address = "${auth.server_address}" | ||
} | ||
} | ||
|
||
env { | ||
%{ for k,v in entrypoint.env ~} | ||
${k} = "${v}" | ||
%{ endfor ~} | ||
|
||
// Ensure we set PORT for the URL service. This is only necessary | ||
// if we want the URL service to function. | ||
PORT = "$${NOMAD_ALLOC_PORT_http}" | ||
} | ||
|
||
service { | ||
tags = ["http"] | ||
port = "http" | ||
check { | ||
type = "http" | ||
port = "http" | ||
path = "/" | ||
interval = "5s" | ||
timeout = "2s" | ||
} | ||
} | ||
|
||
resources { | ||
memory = 256 | ||
cpu = 256 | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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 = "isc" | ||
|
||
# Labels can be specified for organizational purposes. | ||
labels = { "team" = "isc" } | ||
|
||
variable "ghcr" { | ||
type = object({ | ||
username = string | ||
password = string | ||
server_address = string | ||
}) | ||
} | ||
|
||
app "evm-deposit" { | ||
build { | ||
use "docker" { | ||
disable_entrypoint = false | ||
buildkit = true | ||
dockerfile = "./Dockerfile" | ||
} | ||
|
||
registry { | ||
use "docker" { | ||
image = "ghcr.io/luke-thorne/evm_deposit_frontend" | ||
tag = gitrefpretty() | ||
encoded_auth = base64encode(jsonencode(var.ghcr)) | ||
} | ||
} | ||
} | ||
|
||
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-evm-deposit.nomad.tpl", { | ||
artifact = artifact | ||
auth = var.ghcr | ||
workspace = workspace.name | ||
}) | ||
} | ||
} | ||
} |
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