job "mixpost" { datacenters = ["aperture"] type = "service" meta { domain = "mixpost.redbrick.dcu.ie" } group "mixpost" { network { port "http" { to = 80 } port "redis" { to = 6379 } port "db" { to = 3306 } } service { name = "mixpost" port = "http" tags = [ "traefik.enable=true", "traefik.port=${NOMAD_PORT_http}", "traefik.http.routers.mixpost.rule=Host(`${NOMAD_META_domain}`)", "traefik.http.routers.mixpost.entrypoints=web,websecure", "traefik.http.routers.mixpost.tls.certresolver=lets-encrypt", "traefik.http.routers.mixpost.tls.certresolver=mytlschallenge", "traefik.http.middlewares.mixpost.headers.SSLRedirect=true", "traefik.http.middlewares.mixpost.headers.STSSeconds=315360000", "traefik.http.middlewares.mixpost.headers.browserXSSFilter=true", "traefik.http.middlewares.mixpost.headers.contentTypeNosniff=true", "traefik.http.middlewares.mixpost.headers.forceSTSHeader=true", "traefik.http.middlewares.mixpost.headers.SSLHost=`${APP_DOMAIN}`", "traefik.http.middlewares.mixpost.headers.STSIncludeSubdomains=true", "traefik.http.middlewares.mixpost.headers.STSPreload=true" ] } task "mixpost" { driver = "docker" config { image = "inovector/mixpost:latest" ports = ["http"] } template { data = <