From e74353295961adc7f6071d419213e2b34fc6a4bb Mon Sep 17 00:00:00 2001 From: Muhammad Kaisar Arkhan Date: Sun, 14 Oct 2018 19:24:56 +0700 Subject: [PATCH] Add Nomad job specification --- .gitlab-ci.yml | 1 + shortlinks.nomad | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 shortlinks.nomad diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e22ada5..4fbcf7d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: - test - build - release + - deploy test:template_sync: stage: test diff --git a/shortlinks.nomad b/shortlinks.nomad new file mode 100644 index 0000000..d6d81c0 --- /dev/null +++ b/shortlinks.nomad @@ -0,0 +1,35 @@ +job "shortlinks" { + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + datacenters = ["solar-do"] + type = "service" + + group "web" { + count = 1 + + task "server" { + driver = "docker" + + config { + image = "registry.gitlab.com/coala/solar/shortlinks" + } + + service { + address_mode = "driver" + port = 80 + + tags = [ + "traefik.enable=true", + "traefik.frontend.rule=Host:coala.io,www.coala.io", + "traefik.frontend.headers.STSSeconds=315569260", + "traefik.frontend.headers.STSPreload=true", + "traefik.frontend.headers.frameDeny=true", + "traefik.frontend.headers.browserXSSFilter=true" + ] + } + } + } +} -- GitLab