{"id":19721213,"url":"https://github.com/unagisoftware/dokkustrano","last_synced_at":"2025-02-27T18:24:32.533Z","repository":{"id":47922576,"uuid":"421596215","full_name":"unagisoftware/dokkustrano","owner":"unagisoftware","description":"A deployment tool built on Ruby, Rake, and SSH to connect with Dokku servers","archived":false,"fork":false,"pushed_at":"2021-11-08T12:42:58.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T19:26:18.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unagisoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-26T21:59:19.000Z","updated_at":"2022-07-21T14:47:52.000Z","dependencies_parsed_at":"2022-08-12T14:20:17.822Z","dependency_job_id":null,"html_url":"https://github.com/unagisoftware/dokkustrano","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unagisoftware%2Fdokkustrano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unagisoftware%2Fdokkustrano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unagisoftware%2Fdokkustrano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unagisoftware%2Fdokkustrano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unagisoftware","download_url":"https://codeload.github.com/unagisoftware/dokkustrano/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241044101,"owners_count":19899477,"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":[],"created_at":"2024-11-11T23:13:41.226Z","updated_at":"2025-02-27T18:24:32.513Z","avatar_url":"https://github.com/unagisoftware.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dokkustrano: A deployment tool built on Ruby, Rake, and SSH to connect with Dokku servers\n\nDokkustrano is a library for connecting with Dokku servers which run Ruby on Rails applications.\n\nOnce installed on a Rails project, Dokkustrano gives you rake tasks to perform several operations from your command line.\n\n```\n$ cd my-dokkustrano-enabled-rails-project\n$ rails dokku:console[APP_NAME]\n```\n\nWhen you run [Rake](https://github.com/ruby/rake) tasks tasks from the `dokku` namespace, Dokkustrano dutifully connects to your server via SSH and executes the necessary actions.\n\n## Installation\n\n### Requirements\n\n* Ruby version 2.0 or higher on your local machine.\n* [Bundler](http://bundler.io), along with a Gemfile for your project.\n\n### Setup\n\nAdd the gem to your project's Gemfile:\n\n```ruby\ngem 'dokkustrano'\n```\n\nThen run Bundler to ensure Dokkustrano is downloaded and installed:\n\n``` sh\nbundle install\n```\n\nDokkustrano requires you to have configured a SHH host with the server in which Dokku will be running. By default, the host `dokku` will be used, but it can be changed using an initializer (`config/initializers/dokkustrano.rb`):\n\n```ruby\nrequire 'dokkustrano'\n\nDokkustrano.configure do |configuration|\n  configuration.host_name = 'dokku-server'\nend\n```\n\n## Available commands\n\nThese are all the Rake tasks which are provided by this gem:\n```ruby\nrails dokku:console[app,environment]                    # Connect with Dokku app and open a Rails console (if no environment is received, production is used)\nrails dokku:data:export[app]                            # Download dump from Dokku given app\nrails dokku:data:import[app,path]                       # Import dump to given Dokku app\nrails dokku:postgres:change_version[service,version]    # Change PostgreSQL version for given Dokku database service\nrails dokku:postgres:console[service]                   # Connect with PostgreSQL console for given Dokku database service\nrails dokku:ssl:cleanup[app]                            # Cleanup SSL for given Dokku app\nrails dokku:ssl:enable[app]                             # Enable SSL for given Dokku app\nrails dokku:ssl:renew[app]                              # Auto-renew SSL for given Dokku app\n```\n\n## Custom commands\n\nYou can define new actions yourself by writing Rake tasks, which are really simple to make. Here're some examples:\n\n```ruby\nnamespace :dokku do\n  desc 'Enter into container for given Dokku app'\n  task :enter, [:app] =\u003e :environment do |t, args|\n    include Dokkustrano::Validations\n\n    validate_argument!(args, :app)\n\n    sh \"ssh -t #{Dokkustrano.configuration.host_name} 'dokku config:show #{args[:app]}'\"\n  end\nend\n```\n\n```ruby\nnamespace :dokku do\n  namespace :postgres do\n    desc 'Restart PostgreSQL for given Dokku service'\n    task :restart, [:service] =\u003e :environment do |t, args|\n      include Dokkustrano::Validations\n\n      validate_argument!(args, :service)\n\n      sh \"ssh -t #{Dokkustrano.configuration.host_name} 'dokku postgres:restart #{args[:service]}'\"\n    end\n  end\nend\n```\n\nAs it can be seen in the previous examples, if you include the `Dokkustrano::Validations` module, you can use the `validate_argument!` method to validate arguments presence.\n\n```ruby\nvalidate_argument!(args, :app)\nvalidate_argument!(args, :version, :second) # =\u003e indicates that the second argument is missing if that's the case\n```\n\n## Bugs report\n\nPlease, fill an issue with a reproduction of the error in order to report a bug.\n\nIf you think you may have discovered a security vulnerability in Dokkustrano, do not open a GitHub issue. Instead, please send a report to \u003cinfo@unagi.com.ar\u003e.\n\n## License\n\nMIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funagisoftware%2Fdokkustrano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funagisoftware%2Fdokkustrano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funagisoftware%2Fdokkustrano/lists"}