Skip to content

Commit

Permalink
#52: Add aspnet-sample job
Browse files Browse the repository at this point in the history
  • Loading branch information
sevensolutions committed Jun 1, 2024
1 parent 1f12f6e commit 1fa967b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 10 deletions.
44 changes: 44 additions & 0 deletions examples/aspnet_sample_app.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
job "aspnet-sample-app" {
datacenters = ["dc1"]
type = "service"

group "app" {
count = 1

# You may want to set this to true
# prevent_reschedule_on_lost = true

network {
port "httplabel" {}
}

task "app" {
driver = "iis"

artifact {
source = "https://github.com/sevensolutions/nomad-iis/raw/main/examples/aspnet-sample-app.zip"
destination = "local"
}

config {
application {
path = "local"
}

binding {
type = "http"
port = "httplabel"
}
}

env {
SAMPLE_KEY = "my-value"
}

resources {
cpu = 100
memory = 150
}
}
}
}
18 changes: 9 additions & 9 deletions examples/sample_job.hcl → examples/static_sample_app.hcl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
job "iis-test" {
job "static-sample-app" {
datacenters = ["dc1"]
type = "service"

group "iis-test" {
group "app" {
count = 1

# You may want to set this to true
# prevent_reschedule_on_lost = true

network {
port "httplabel" {}
}

task "iis-test" {
task "app" {
driver = "iis"

artifact {
Expand All @@ -24,21 +24,21 @@ job "iis-test" {
application {
path = "local"
}
# application {
# application {
# alias = "subapp"
# path = "C:\\inetpub\\wwwroot"
# }

binding {
type = "http"
port = "httplabel"
}
}
env {

env {
my_key = "my-value"
}

resources {
cpu = 100
memory = 20
Expand Down
3 changes: 2 additions & 1 deletion src/NomadIIS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Pr
..\.gitignore = ..\.gitignore
..\examples\agent.dev.hcl = ..\examples\agent.dev.hcl
..\examples\agent.hcl = ..\examples\agent.hcl
..\examples\aspnet_sample_app.hcl = ..\examples\aspnet_sample_app.hcl
..\.github\dependabot.yml = ..\.github\dependabot.yml
..\README.md = ..\README.md
..\examples\sample_job.hcl = ..\examples\sample_job.hcl
..\examples\static_sample_app.hcl = ..\examples\static_sample_app.hcl
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 1fa967b

Please sign in to comment.