Hi,
I would like to run a service in local machine and let it finish completely.
I started nomad in local machine with -dev
flag.
Required state:
- Start the process
- Finish the process
- Restart only if error occurs
Current state:
- Start process
- Finish Process
- Process restarts
- Docker images are missing(I am not sure why it is getting deleted in local machine)
- Process in pending state due to non availability of the docker.
job "python-app" {
datacenters = ["dc1"]
group "python" {
count = 2
task "server" {
driver = "docker"
config {
image = "python-app:local"
}
service {
name = "python-flask"
tags = [
"linux",
]
}
}
}
}
This is very small app for testing purpose.
app.py
import time
for each in range(100):
print(each)
time.sleep(3)
Is the issue something related to Restart and Reschedule stanzas?