Can someone explain why I can't access my website running in a docker container thru nomad or what I'm doing wrong ? I'm beginner in system and networking.
I would like to make the container http listen on 127.0.0.1:8088 so that nginx can proxy.
Nomad server and client are running on the same machine
Machine is fedora, disabled SELinux, firewall disabled.
What I expect :
Request to <server_ip>:8088 responds website
What I get :
Response is Connection refused.
nomad conf :
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "DEBUG"
server {
# license_path is required for Nomad Enterprise as of Nomad v1.1.1+
#license_path = "/etc/nomad.d/license.hclic"
enabled = true
bootstrap_expect = 1
}
acl {
enabled = true
}
client {
enabled = true
servers = ["127.0.0.1"]
}
nomad job :
job "ctprods-app" {
datacenters = ["*"]
group "ctprods-group" {
count = 1
network {
port "http" {
static = 8088
to = 8088
}
}
task "ctprods-task" {
driver = "docker"
env {
ENVIRONMENT = "production"
}
config {
image = "ctaque/ctprods:latest"
ports = [
"http"
]
}
}
}
}
nginx block :
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8088/;
}
ss -nplut :
tcp LISTEN 0 4096 <server_public_ip>:8088 0.0.0.0:*
nomad job port map :
nomad job running :