All Projects → nicolai86 → ansible-rails-deployment

nicolai86 / ansible-rails-deployment

Licence: MIT license
deploy projects using ansible

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ansible-rails-deployment

Rails
Official Ruby on Rails specific tasks for Capistrano
Stars: ✭ 773 (+903.9%)
Mutual labels:  deployment, capistrano
Shipit
Universal automation and deployment tool ⛵️
Stars: ✭ 5,249 (+6716.88%)
Mutual labels:  deployment, capistrano
capistrano-uberspace
Deploy your rails app on an uberspace with Capistrano 3
Stars: ✭ 14 (-81.82%)
Mutual labels:  deployment, capistrano
Procsd
Manage your application processes in production hassle-free like Heroku CLI with Procfile and Systemd
Stars: ✭ 181 (+135.06%)
Mutual labels:  deployment, capistrano
Deploy
Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
Stars: ✭ 2,141 (+2680.52%)
Mutual labels:  deployment, capistrano
Hapistrano
Deploy tool for Haskell applications, like Capistrano for Rails
Stars: ✭ 91 (+18.18%)
Mutual labels:  deployment, capistrano
capistrano-docker-compose
Docker Compose specific tasks for Capistrano
Stars: ✭ 17 (-77.92%)
Mutual labels:  deployment, capistrano
Capistrano
Remote multi-server automation tool
Stars: ✭ 12,035 (+15529.87%)
Mutual labels:  deployment, capistrano
Cape
Dynamically generates Capistrano recipes for Rake tasks
Stars: ✭ 178 (+131.17%)
Mutual labels:  deployment, capistrano
capistrano-chewy
Chewy tasks and Elasticsearch indexes management with Capistrano
Stars: ✭ 14 (-81.82%)
Mutual labels:  deployment, capistrano
tfdeploy
tfdeploy: Deploy Tensorflow Models from R
Stars: ✭ 22 (-71.43%)
Mutual labels:  deployment
ploi-deploy-action
Deploy your application to Ploi with Github actions
Stars: ✭ 25 (-67.53%)
Mutual labels:  deployment
volkscv
A Python toolbox for computer vision research and project
Stars: ✭ 58 (-24.68%)
Mutual labels:  deployment
django-projesini-yayina-alma
Django uygulamasını yayına almak için Türkçe dökümantasyon
Stars: ✭ 98 (+27.27%)
Mutual labels:  deployment
mina-hanami
🌸 Mina plugin for Hanami
Stars: ✭ 13 (-83.12%)
Mutual labels:  deployment
envoyer-npm-deployment
Compile assets that depend on node packages using Laravel Envoyer deployment hooks
Stars: ✭ 43 (-44.16%)
Mutual labels:  deployment
DeploymentReadinessChecker
Pester-based tool to validate that a (potentially large) number of machines meet the prerequisites for a software deployment/upgrade.
Stars: ✭ 31 (-59.74%)
Mutual labels:  deployment
docker-deployer
Docker image for PHP Deployer.
Stars: ✭ 24 (-68.83%)
Mutual labels:  deployment
drupal-pi
Drupal on Docker on a Raspberry Pi. Pi Dramble's little brother.
Stars: ✭ 92 (+19.48%)
Mutual labels:  deployment
tiller-circleci-orb
Deploy Trellis, Bedrock and Sage(optional) via CircleCI
Stars: ✭ 13 (-83.12%)
Mutual labels:  deployment

rails-deployment

A role that executes common tasks when deploying ruby on rails applications.

Depends on prepare-release and finalize-release roles to checkout a new version from your git versioned application.

example usage:

---
- hosts: server
  user: app
  gather_facts: False
  vars:
    user: app
    home_directory: "/home/{{ user }}"
    rails_env: "staging"
    deploy_to: "{{ home_directory }}"

  roles:
    -
      role: nicolai86.prepare-release

      repo: [email protected]:app
      branch: develop

      symlinks:
        - { src: "{{ shared_path }}/vendor/bundle", dest: "{{ build_path }}/vendor/bundle" }
        - { src: "{{ shared_path }}/public/assets", dest: "{{ build_path }}/public/assets" }
        - { src: "{{ shared_path }}/log", dest: "{{ build_path }}/log" }
        - { src: "{{ shared_path }}/.env", dest: "{{ build_path }}/.env" }
        - { src: "{{ shared_path }}/config/database.yml", dest: "{{ build_path }}/config/database.yml" }

      directories:
        - "{{ shared_path }}/config"

      templates:
        - { src: "templates/env.js", dest: "{{ shared_path }}/.env" }

      tags: deploy

    -
      role: nicolai86.rails-deployment

      migrate: yes
      compile_assets: yes
      force_migrate: no
      force_asset_compilation: no

      tags: deploy

    -
      role: nicolai86.finalize-release

      tags: deploy

    -
      role: restart

      service: application:*

      tags:
        - deploy
        - rollback

configuration

Most parts of the role can be configured using variables. For example, if you are using rails but using SQL for schema management, you can easily configure rails-deployment to compare the structure.sql files instead of schema.rb like this:

-
  role: nicolai86.rails-deployment

  migrate: yes

  migrate_diff_paths:
    - { current: "{{ current_path }}/db/structure.sql", next: "{{ build_path }}/db/structure.sql" }

See defaults/main.yml for details about available variables.

requirements

  • all gem binaries (e.g. bundle, rake, rails) need to be locateable using the $PATH. Make sure to setup properly

If you are using rbenv to manage your ruby version make sure to properly set the environment using something like this:

environment:
  PATH: '~/.rbenv/shims:~/.rbenv/bin:"$PATH"'

important features:

  • it can be reused multiple times inside a single playbook for separate deployments.
  • works with rvm, rbenv or system ruby installations.
  • it's using a bare copy of the repository to deploy.
  • migration and asset compilation can be de-activated as needed.
  • only keeps 5 most recent deployments per default

limitations

  • you need to write your own restart handling
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].