All Projects → tessi → capistrano-uberspace

tessi / capistrano-uberspace

Licence: MIT license
Deploy your rails app on an uberspace with Capistrano 3

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to capistrano-uberspace

Rails
Official Ruby on Rails specific tasks for Capistrano
Stars: ✭ 773 (+5421.43%)
Mutual labels:  deployment, capistrano
Shipit
Universal automation and deployment tool ⛵️
Stars: ✭ 5,249 (+37392.86%)
Mutual labels:  deployment, capistrano
ansible-rails-deployment
deploy projects using ansible
Stars: ✭ 77 (+450%)
Mutual labels:  deployment, capistrano
Procsd
Manage your application processes in production hassle-free like Heroku CLI with Procfile and Systemd
Stars: ✭ 181 (+1192.86%)
Mutual labels:  deployment, capistrano
Deploy
Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
Stars: ✭ 2,141 (+15192.86%)
Mutual labels:  deployment, capistrano
Hapistrano
Deploy tool for Haskell applications, like Capistrano for Rails
Stars: ✭ 91 (+550%)
Mutual labels:  deployment, capistrano
capistrano-docker-compose
Docker Compose specific tasks for Capistrano
Stars: ✭ 17 (+21.43%)
Mutual labels:  deployment, capistrano
Capistrano
Remote multi-server automation tool
Stars: ✭ 12,035 (+85864.29%)
Mutual labels:  deployment, capistrano
Cape
Dynamically generates Capistrano recipes for Rake tasks
Stars: ✭ 178 (+1171.43%)
Mutual labels:  deployment, capistrano
capistrano-chewy
Chewy tasks and Elasticsearch indexes management with Capistrano
Stars: ✭ 14 (+0%)
Mutual labels:  deployment, capistrano
monitoring-rancher
🤠How to Set up Rancher Server Monitoring with TIG Stack?
Stars: ✭ 22 (+57.14%)
Mutual labels:  deployment
SwarmManagement
Swarm Management is a python application, installed with pip. The application makes it easy to manage a Docker Swarm by configuring a single *.yml file describing which stacks to deploy, and which networks, configs or secrets to create.
Stars: ✭ 25 (+78.57%)
Mutual labels:  deployment
workflow-webhook
A Github workflow action to call a webhook with payload data from the event. Support for JSON or URL encoded endpoints.
Stars: ✭ 90 (+542.86%)
Mutual labels:  deployment
docker-deployer
Docker image for PHP Deployer.
Stars: ✭ 24 (+71.43%)
Mutual labels:  deployment
deploying-with-now
A simple node server demo for deploying with https://zeit.co/now.
Stars: ✭ 20 (+42.86%)
Mutual labels:  deployment
swift-buildpack
IBM Cloud buildpack for Swift
Stars: ✭ 33 (+135.71%)
Mutual labels:  deployment
extensiveautomation-server
Extensive Automation server
Stars: ✭ 19 (+35.71%)
Mutual labels:  deployment
cdk-ecr-deployment
A CDK construct to deploy docker image to Amazon ECR
Stars: ✭ 51 (+264.29%)
Mutual labels:  deployment
librephotos-docker
You can find here the Dockerfiles for the automated build process of LibrePhotos.
Stars: ✭ 81 (+478.57%)
Mutual labels:  deployment
django-projesini-yayina-alma
Django uygulamasını yayına almak için Türkçe dökümantasyon
Stars: ✭ 98 (+600%)
Mutual labels:  deployment

Capistrano::Uberspace

Deploy your Rails App to uberspace with Capistrano 3.

Has support for many databases, ruby versions, and ruby web server.

Note: It seems that for new uberspaces (on the uberspace version 7 platform) we get some errors. Any help in fixing these is highly appreciated. See #15

Installation

Add this to your application's Gemfile:

# Gemfile

group :development do
  gem 'capistrano', '~> 3.4.0'
  gem 'capistrano-uberspace', github: 'tessi/capistrano-uberspace'
end

And then execute:

$ bundle install

In your config/deploy.rb file specify some app properties.

# config/deploy.rb

set :application, 'MyGreatApp'
set :repo_url, '[email protected]:tessi.my_great_app.git'

Note: We strongly advice you to deploy only one app per uberspace account. Should you really want to deploy multiple apps (or the same app with different stages) on the same uberspace, make sure to set the application to something unique for each app. (for instance set application to be my-application-production in config/deploy/production.rb and my-application-staging config/deploy/staging.rb).

Also specify how to reach the uberspace server in your stage definition (e.g. production.rb):

# config/deploy/production.rb

server 'your-host.uberspace.de',
       user: 'uberspace-user',
       roles: [:app, :web, :cron, :db],
       primary: true,
       ssh_options: {
         keys: %w{~/.ssh/your_uberspace_private_key},
         forward_agent: true,
         auth_methods: %w(publickey)
       }

set :user, 'uberspace-user'
set :environment, :production
set :branch, :production
set :domain, 'my-subdomain.example.tld'

Be sure to setup the ssh-connection to your uberspace.

Require the following parts in your Capfile:

# Capfile

require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/uberspace'

Note that all require's (except capistrano/uberspace of course) is what you usually require for a rails app. Feel free to change those parts however you desire.

This will deploy your app with postgres and passenger as defaults. You may choose to use a different database or ruby server. Read about it in Choosing another database backend or Choosing another ruby server.

Choosing another database backend

We use postgresql as the default database backend. However, you are free to use mysql or sqlite3 if you fancy that.

Do so by requiring your favourite database backend in your Capfile:

# Capfile

require 'capistrano/uberspace/<database>'  # replace <database> with mysql, postgresql, or sqlite3

Don't forget to add your database-gem as a production dependency to your Gemfile.

Choosing another ruby server

We use passenger as the default server. However, you may want to use puma (or like to explicitly specify passenger).

Do so by requiring your favourite server in your Capfile:

# Capfile

require 'capistrano/uberspace/puma' # replace puma with passenger, if you prefer passenger

Don't forget to add your server-gem as a production dependency to your Gemfile.

Usage

Execute bundle exec cap <stage> deploy to deploy to your uberspace.

Configurable options:

set :ruby_version, '2.2'  # default is '2.3.1', can be set to every ruby version supported by uberspace.
set :domain, nil          # if you want to deploy your app as a subdomain, configure it here. Use the full URI. E.g. my-custom.example.tld
set :add_www_domain, true # default: true; set this to false if you do not want to also use your subdomain with prefixed www.

# optionally, you can enable http basic auth with:
set :htaccess_username, "username"
set :htaccess_password, "password"
# instead of the :htaccess_password you may set the hashed password directly:
# set :htaccess_password_hashed, "bi2wsSekmG6Yw"

Useful tasks:

deploy:start      # starts the server
deploy:stop       # stops the server
deploy:restart    # restarts the server (automatically done after deploy)
deploy:status     # shows the current status of the deamon which runs passenger
uberspace:db:dump # downloads the latest available backup of your remote database to tmp/dump.{sql,sqlite3}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

For new features, it's best to discuss the idea (in a new issue) before implementing. We might come to a better solution together and save you some work.

Thanks

This gem was inspired by the awesome uberspacify gem, which lets you deploy your Rails app to uberspace with Capistrano 2.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].