{"id":19466824,"url":"https://github.com/dena/capistrano-net_storage","last_synced_at":"2025-07-04T12:02:27.814Z","repository":{"id":19829123,"uuid":"88024972","full_name":"DeNA/capistrano-net_storage","owner":"DeNA","description":"Capistrano Plugin for Fast Deployment via Remote Storage","archived":false,"fork":false,"pushed_at":"2023-08-07T13:36:19.000Z","size":154,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-06T16:51:24.422Z","etag":null,"topics":["capistrano","deployment"],"latest_commit_sha":null,"homepage":null,"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/DeNA.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}},"created_at":"2017-04-12T07:53:03.000Z","updated_at":"2023-10-05T11:01:32.000Z","dependencies_parsed_at":"2022-09-12T05:51:18.355Z","dependency_job_id":null,"html_url":"https://github.com/DeNA/capistrano-net_storage","commit_stats":null,"previous_names":["dena/capistrano-net_storage","denadev/capistrano-net_storage"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/DeNA/capistrano-net_storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeNA%2Fcapistrano-net_storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeNA%2Fcapistrano-net_storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeNA%2Fcapistrano-net_storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeNA%2Fcapistrano-net_storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeNA","download_url":"https://codeload.github.com/DeNA/capistrano-net_storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeNA%2Fcapistrano-net_storage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262026976,"owners_count":23246953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","deployment"],"created_at":"2024-11-10T18:30:28.927Z","updated_at":"2025-06-26T08:04:13.703Z","avatar_url":"https://github.com/DeNA.png","language":"Ruby","readme":"[![Gem Version](https://badge.fury.io/rb/capistrano-net_storage.svg)](https://badge.fury.io/rb/capistrano-net_storage)\n[![Test](https://github.com/DeNADev/capistrano-net_storage/actions/workflows/test.yml/badge.svg)](https://github.com/DeNADev/capistrano-net_storage/actions/workflows/test.yml?query=branch%3Amaster)\n\n# Capistrano::NetStorage\n\n**Capistrano::NetStorage** is a [Capistrano](http://capistranorb.com/) plugin to deploy application\nvia _remote storage_ such as [Amazon S3](https://aws.amazon.com/s3/),\n[Google Cloud Storage](https://cloud.google.com/storage/) and so on.\n\nLogically, this tool enables _O(1)_ deployment.\n\n\n## Concept\n\nThe image below illustrates the concept of **Capistrano::NetStorage**.\n\n![concept](docs/images/concept.png)\n\nThis library conducts the following procedures as _capistrano tasks_:\n\n1. Prepare an archive of application to upload.\n  * Clone and update source code repository on deploy server.\n  * Extract the internals to local release directory.\n  * Further prepare the local release. (e.g. `bundle install` and `assets:precompile`)\n2. Upload the archive to _remote storage_.\n3. Download the archive from _remote storage_ on application servers.\n  * This task is executed in parallel way.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'capistrano-net_storage'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install capistrano-net_storage\n\n## Configuration\n\nSet Capistrano variables by `set name, value`.\n\nYou can consult configuration of Capistrano itself at https://capistranorb.com/documentation/getting-started/configuration/\n\nConfigurations of Capistrano::NetStorage are as follows:\n\n#### General Settings\n\n Name | Default | Description\n------|---------|------------\n `:net_storage_transport` | NO DEFAULT | Transport class for _remote storage_ e.g. `Capistrano::NetStorage::S3`\n `:net_storage_config_files` | `[]` | Files to sync `config/` directory on target servers' application directory\n\n#### Settings for Behavioral Changes\n\n Name | Default | Description\n------|---------|------------\n `:net_storage_skip_bundle` | `false` | Skip `bundle install` when creating archive (might be work for non-Ruby app)\n `:net_storage_multi_app_mode` | `false` | Deploy a repository with multiple Rails apps at the top directory\n\n#### Other Settings\n\n**NOTE: We strongly recommend the defaults for integrity and performance. Change at your own risk.**\n\n Name | Default | Description\n------|---------|------------\n `:net_storage_archiver` | `Capistrano::NetStorage::Archiver::TarGzip` | Archiver class\n `:net_storage_scm` | `Capistrano::NetStorage::SCM::Git` | Internal scm class for application repository\n `:net_storage_upload_files_by_rsync` | `true` | Use rsync(1) to deploy config files\n `:net_storage_rsync_options` | `#{ssh_options}` | SSH options for rsync command to sync configs\n `:net_storage_max_parallels` | 1000 | Max concurrency for remote tasks. (This default is being tuned by maintainers.)\n `:net_storage_reuse_archive` | `true` | If `true`, it reuses archive with the same commit hash at remote storage and uploads archives only when it does not exist.\n `:net_storage_local_base_path` | `.local_net_storage` | Base directory on deploy server\n `:net_storage_archives_path` | `#{deploy_to}/net_storage_archives` | Archive directories on application server\n `:net_storage_keep_remote_archives` | 10 | Number of archive files keep on remote storage\n\n### Transport Plugins\n\nHere are available plugins list which serves as `:net_storage_transport`:\n\n- [Capistrano::NetStorage::S3::Transport](https://github.com/DeNADev/capistrano-net_storage-s3) for [Amazon S3](https://aws.amazon.com/s3/)\n\nIf you wish a plugin for other types of _remote storage_, you can develop it. It should inherit\n`Capistrano::NetStorage::Transport::Base` class.\n\n## Usage\n\nBelow is the typical usage of Capistrano::NetStorage.\n\nEdit Capfile:\n\n```ruby\n# Load DSL and Setup Up Stages\nrequire 'capistrano/setup'\n\n# Includes default deployment tasks\nrequire 'capistrano/deploy'\n\n# Includes tasks from other gems included in your Gemfile\nrequire \"capistrano/net_storage/plugin\"\ninstall_plugin Capistrano::NetStorage::Plugin\n\n# Load transport plugin for Capistrano::NetStorage\nrequire 'capistrano/net_storage/s3' # or your_custom_transport\n```\n\nEdit your `config/deploy.rb`:\n\n```ruby\nset :net_storage_transport, Capistrano::NetStorage::S3::Transport # or YourCustomTransport class\nset :net_storage_config_files, Pathname('path/to/config').glob('*.yml')\n```\n\nWhen you want to further prepare the release before deployment, you can write it as follows:\n\n```ruby\nnamespace :your_namespace do\n  task :prepare_archive do\n    run_locally do\n      within Capistrano::NetStorage.config.local_release_app_path do\n        # The resultant artifacts are to be archived with other files\n        execute :bundle, 'exec', 'rake', 'build_in_memory_cache_bundle'\n        execute :bundle, 'exec', 'rake', 'assets:precompile'\n      end\n    end\n  end\nend\n\nafter 'net_storage:prepare_archive', 'your_namespace:prepare_archive'\n```\n\n## License\n\nAvailable as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\nCopyright (c) 2017 DeNA Co., Ltd., IKEDA Kiyoshi\n\n## Special Thanks\n\nThe previous version of this program was originally developed by @bobpp.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdena%2Fcapistrano-net_storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdena%2Fcapistrano-net_storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdena%2Fcapistrano-net_storage/lists"}