{"id":19414455,"url":"https://github.com/axsuul/capistrano-nomad","last_synced_at":"2026-02-14T15:32:11.531Z","repository":{"id":199114983,"uuid":"702180386","full_name":"axsuul/capistrano-nomad","owner":"axsuul","description":"Capistrano plugin for deploying and managing Nomad jobs","archived":false,"fork":false,"pushed_at":"2026-01-30T04:06:14.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-30T10:02:36.887Z","etag":null,"topics":["capistrano","nomad","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axsuul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-08T18:16:46.000Z","updated_at":"2026-01-30T04:06:15.000Z","dependencies_parsed_at":"2023-12-15T00:27:57.168Z","dependency_job_id":"2598edf4-ddfd-4644-97d9-94f5eebab096","html_url":"https://github.com/axsuul/capistrano-nomad","commit_stats":null,"previous_names":["axsuul/capistrano-nomad"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/axsuul/capistrano-nomad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axsuul%2Fcapistrano-nomad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axsuul%2Fcapistrano-nomad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axsuul%2Fcapistrano-nomad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axsuul%2Fcapistrano-nomad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axsuul","download_url":"https://codeload.github.com/axsuul/capistrano-nomad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axsuul%2Fcapistrano-nomad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29447993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capistrano","nomad","rails","ruby"],"created_at":"2024-11-10T12:38:09.880Z","updated_at":"2026-02-14T15:32:11.525Z","avatar_url":"https://github.com/axsuul.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capistrano-nomad\n\nCapistrano plugin for deploying and managing [Nomad](http://nomadproject.io) jobs\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"capistrano-nomad\"\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install capistrano-nomad\n```\n\n## Usage\n\nAdd to `Capfile`\n\n```ruby\nrequire \"capistrano/nomad\"\ninstall_plugin Capistrano::Nomad\n```\n\nWithin `deploy.rb`\n\n```ruby\nset :nomad_jobs_path, \"nomad/jobs\"\nset :nomad_var_files_path, \"nomad/vars\"\n\n# Set token\nset :nomad_token, \"abc123\"\n\n# Determines base URL to use when opening job in web UI\nset :nomad_ui_url, \"http://localhost:4646\"\n\n# Make variables available to all template .erb files\nset :nomad_template_vars, (lambda do\n  {\n    env_name: fetch(:stage).to_sym,\n    domain: fetch(:domain),\n    foo: \"bar,\"\n  }\nend)\n\n# Change docker build command\nset :nomad_docker_build_command, (lambda do\n  \"docker buildx build\"\nend)\n\n# Pass additional options into `docker build`\nset :nomad_docker_build_command_options, (lambda do\n  [\n    \"--cache-to type=gha\",\n    \"--cache-from type=gha\",\n  ]\nend)\n\n# Make helpers available to all template .erb files\nnomad_template_helpers do\n  def restart_stanza(interval = \"1m\")\n    \u003c\u003c-EOF\n      restart {\n        interval = \"#{interval}\"\n        attempts = 3\n        mode = \"delay\"\n      }\n    EOF\n  end\nend\n\n# Use hosted Docker image\nnomad_docker_image_type :postgres,\n  alias: \"postgres:5.0.0\"\n\n# Use Docker image that will be built locally relative to project and push\nnomad_docker_image_type :backend,\n  path: \"local/path/backend\",\n  alias: -\u003e(image_type:) { \"gcr.io/axsuul/#{image_type}\" },\n  target: \"release\",\n  build_args: { foo: \"bar\" }\n\n# Use Docker image that will be built locally from an absolute path and push\nnomad_docker_image_type :redis,\n  path: \"/absolute/path/redis\",\n  alias: \"gcr.io/axsuul/redis\"\n\n# Use Docker image that will be built remotely on server\nnomad_docker_image_type :restic,\n  path: \"containers/restic\",\n  alias: \"my-project/restic:local\",\n  strategy: :remote_build\n\n# Jobs\nnomad_job :backend, docker_image_types: [:backend], var_files: [:rails]\nnomad_job :frontend, console_command: \"/bin/bash\"\nnomad_job :postgres, docker_image_types: [:postgres]\nnomad_job :redis, docker_image_types: [:redis], tags: [:redis]\nnomad_job :\"traefik-default\", template: :admin,\n  erb_vars: { role: :default },\n  tags: [:traefik]\nnomad_job :\"traefik-secondary\", template: :admin,\n  erb_vars: { role: :secondary },\n  tags: [:traefik]\n\nnomad_namespace :analytics, tags: [:admin], erb_vars: { role: :default } do\n  nomad_job :grafana\nend\n\nnomad_namespace :maintenance, path: \"maintenance-stuff\" do\n  nomad_job :garbage_collection\nend\n```\n\nDeploy individual jobs\n\n```shell\ncap production nomad:app:deploy\ncap production nomad:analytics:grafana:deploy\n```\n\nManage jobs\n\n```shell\ncap production nomad:app:start\ncap production nomad:app:stop\ncap production nomad:redis:purge\ncap production nomad:analytics:grafana:restart\ncap production nomad:postgres:status\n```\n\nTasks can apply across all namespaces or be filtered by namespaces or tags\n\n```shell\ncap production nomad:analytics:deploy\ncap production nomad:analytics:upload_run\ncap production nomad:deploy\ncap production nomad:deploy TAG=admin\ncap production nomad:upload_run\ncap production nomad:upload_run TAGS=admin,redis\n```\n\nOpen console\n\n```shell\ncap production nomad:app:console\ncap production nomad:app:console TASK=custom-task-name\ncap production nomad:analytics:grafana:console CMD=/bin/bash\n```\n\nDisplay logs\n\n```shell\ncap production nomad:app:logs\ncap production nomad:app:stdout\ncap production nomad:app:stderr\ncap production nomad:analytics:grafana:follow\n```\n\nRevert jobs\n\n```shell\ncap production nomad:app:revert\ncap production nomad:app:revert VERSION=4\ncap production nomad:app:revert DOCKER_IMAGE=v1.4.4\n```\n\nRun jobs in detached mode (fire and forget)\n\n```shell\nIS_DETACHED=true cap production nomad:app:deploy\nIS_DETACHED=true cap production nomad:app:run\nIS_DETACHED=true cap production nomad:analytics:grafana:upload_run\n```\n\nOpen job in web UI\n\n```shell\ncap production nomad:app:ui\n```\n\nCreate missing and delete unused namespaces\n\n```shell\ncap production nomad:modify_namespaces\n```\n\nShow version\n\n```shell\ncap production nomad:version\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/axsuul/capistrano-nomad.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxsuul%2Fcapistrano-nomad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxsuul%2Fcapistrano-nomad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxsuul%2Fcapistrano-nomad/lists"}