Skip to content

Commit

Permalink
Fix networking, add more ram
Browse files Browse the repository at this point in the history
  • Loading branch information
kanshi committed Oct 8, 2024
1 parent a7746a3 commit 2918bd5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
15 changes: 8 additions & 7 deletions operations/deploy-live.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ job "api-service-live" {
network {
mode = "bridge"
port "http-port" {
static = 9233
to = 80
host_network = "wireguard"
}
}
Expand Down Expand Up @@ -60,21 +58,24 @@ job "api-service-live" {

resources {
cpu = 256
memory = 2048
memory = 4096
}

}

task "varnish-cache-live-task" {
driver = "docker"

env {
VARNISH_HTTP_PORT = "80"
template {
data = <<EOH
VARNISH_HTTP_PORT="{{ env `NOMAD_PORT_http_port` }}"
EOH
destination = "local/file.env"
env = true
}

config {
image = "varnish"
force_pull = true
volumes = [
"local/default.vcl:/etc/varnish/default.vcl:ro"
]
Expand All @@ -83,7 +84,7 @@ job "api-service-live" {

resources {
cpu = 256
memory = 512
memory = 1024
}

service {
Expand Down
10 changes: 6 additions & 4 deletions operations/deploy-stage.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ job "api-service-stage" {
network {
mode = "bridge"
port "http-port" {
static = 9133
to = 80
host_network = "wireguard"
}
}
Expand Down Expand Up @@ -68,8 +66,12 @@ job "api-service-stage" {
task "varnish-cache-stage-task" {
driver = "docker"

env {
VARNISH_HTTP_PORT = "80"
template {
data = <<EOH
VARNISH_HTTP_PORT="{{ env `NOMAD_PORT_http_port` }}"
EOH
destination = "local/file.env"
env = true
}

config {
Expand Down

0 comments on commit 2918bd5

Please sign in to comment.