diff --git a/jobs/traefik.hcl b/jobs/traefik.hcl index 3813cb7..0ded606 100644 --- a/jobs/traefik.hcl +++ b/jobs/traefik.hcl @@ -24,7 +24,7 @@ job "traefik" { task "traefik" { driver = "docker" config { - image = "traefik:2.8" + image = "traefik" network_mode = "host" volumes = [ diff --git a/jobs/user-projects/general/nova-timetable.hcl b/jobs/user-projects/general/nova-timetable.hcl new file mode 100644 index 0000000..790340f --- /dev/null +++ b/jobs/user-projects/general/nova-timetable.hcl @@ -0,0 +1,41 @@ +job "nova-timetable" { + datacenters = ["aperture"] + + type = "service" + + group "nova-timetable" { + count = 1 + + network { + port "http" { + to = 80 + } + } + + service { + port = "http" + name = "nova-timetable" + check { + type = "http" + path = "/healthcheck" + interval = "10s" + timeout = "2s" + } + + tags = [ + "traefik.enable=true", + "traefik.http.routers.nova-timetable.rule=Host(`timetable.redbrick.dcu.ie`)", + "traefik.http.routers.nova-timetable.entrypoints=web,websecure", + "traefik.http.routers.nova-timetable.tls.certresolver=lets-encrypt", + ] + } + + task "python-application" { + driver = "docker" + config { + image = "novanai/timetable-sync" + ports = ["http"] + } + } + } +}