I'm currently running a docker container with Traefik as the load balancer using the following docker-compose file:
services: loris: image: bdlss/loris-grok-docker labels: - traefik.http.routers.loris.rule=Host(`loris.my_domain`) - traefik.http.routers.loris.tls=true - traefik.http.routers.loris.tls.certresolver=lets-encrypt - traefik.port=80 networks: - web It is working fairly well. As part of one my first attempts using Nomad, I simply want to be able to start this container using a nomad job loris.nomad instead of using the docker-compose file.
The Docker container 'Labels' and the 'Network' identification are quite important for Traefik to do the dynamic routing.
My question is: where can I put this "label" information and "network" information in the loris.nomad file so that it starts the container in the same way that the docker-compose file currently does.
I've tried putting this information in the task.config stanza but this doesn't work and I'm having trouble following the documentation. I've seen examples where an additional "service" stanza has been added, but I"m still not sure.
Here's the basics of that nomad file I want to modify.
# loris.nomad job "loris" { datacenters = ["dc1"] group "loris" { network { port "http" { to = 5004 } task "loris" { driver = "docker" config { image = "bdlss/loris-openjpeg-docker" ports = ["http"] } resources { cpu = 500 memory = 512 } } } } Any advice is much appreciated.
https://stackoverflow.com/questions/65495567/running-a-nomad-job-for-a-docker-container-that-traefik-can-find December 30, 2020 at 12:39AM
没有评论:
发表评论