All Projects → eendroroy → puma-deploy

eendroroy / puma-deploy

Licence: MIT License
capistrano deploy script for puma with nginx

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to puma-deploy

Pulsar
Manage your Capistrano deployments with ease
Stars: ✭ 129 (+821.43%)
Mutual labels:  capistrano, deploy
Shipit
Universal automation and deployment tool ⛵️
Stars: ✭ 5,249 (+37392.86%)
Mutual labels:  capistrano, deploy
appside
Multitenant environment automation.
Stars: ✭ 36 (+157.14%)
Mutual labels:  capistrano, deploy
Deploy
Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
Stars: ✭ 2,141 (+15192.86%)
Mutual labels:  capistrano, deploy
EmbeddedTools
Additions to the model-based DSL for deploying Java and Native projects to remote targets
Stars: ✭ 14 (+0%)
Mutual labels:  deploy
now-docs
[WIP] Deploy docs with a single command using Now
Stars: ✭ 45 (+221.43%)
Mutual labels:  deploy
djeasy
Django Project Deploy Easier to in Debian Distribution!
Stars: ✭ 24 (+71.43%)
Mutual labels:  deploy
dudestack
A toolkit for creating a new professional WordPress project with deployments. Originally based on Roots/bedrock.
Stars: ✭ 82 (+485.71%)
Mutual labels:  capistrano
repl.deploy
Automatically deploy from GitHub to Replit, lightning fast ⚡️
Stars: ✭ 63 (+350%)
Mutual labels:  deploy
capistrano-decompose
Capistrano plugin to deploy your application inside docker containers with docker compose
Stars: ✭ 17 (+21.43%)
Mutual labels:  capistrano
capistrano-docker-compose
Docker Compose specific tasks for Capistrano
Stars: ✭ 17 (+21.43%)
Mutual labels:  capistrano
ploi-deploy-action
Deploy your application to Ploi with Github actions
Stars: ✭ 25 (+78.57%)
Mutual labels:  deploy
aliyun-oss-deploy
🙈 一个 nodejs 命令行工具,用于部署静态资源到 aliyun oss,支持代码方式和 CLI 方式!
Stars: ✭ 31 (+121.43%)
Mutual labels:  deploy
capistrano-uberspace
Deploy your rails app on an uberspace with Capistrano 3
Stars: ✭ 14 (+0%)
Mutual labels:  capistrano
jekyll-deploy-action
🪂 A Github Action to deploy the Jekyll site conveniently for GitHub Pages.
Stars: ✭ 162 (+1057.14%)
Mutual labels:  deploy
devops-guidebook
📚 DevOps 知识图谱 关于Linux、服务器、数据库、部署等相关体系
Stars: ✭ 25 (+78.57%)
Mutual labels:  deploy
ngx-deploy-docker
Deploy your Angular Application to a Docker registry directly from the Angular CLI! 🚀
Stars: ✭ 14 (+0%)
Mutual labels:  deploy
ai-deployment
关注AI模型上线、模型部署
Stars: ✭ 149 (+964.29%)
Mutual labels:  deploy
ansible-rails-deployment
deploy projects using ansible
Stars: ✭ 77 (+450%)
Mutual labels:  capistrano
ipfs-action
GitHub Action for upload to IPFS. Supports Pinata, Infura pinning service as well as direct upload.
Stars: ✭ 115 (+721.43%)
Mutual labels:  deploy

Puma Deploy

Contributors GitHub last commit (branch) license GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests

Rails-5 application deploy configuration using puma and nginx.

Description

  • Optional configuration of production and staging environments in same server.
  • Embedded Nginx configuration.
  • Embedded Puma init script and puma configuration.
  • Log rotation.

Prerequisites

Requires following gems.

gem 'puma'
group :development do
  gem 'capistrano'
  gem 'capistrano-bundler'
  gem 'capistrano-rails'
  gem 'capistrano-rails-console'
  gem 'capistrano-rbenv'
end

Installing

  • Copy following files in your application root maintaining the structure:
.
├── Capfile
├── config
│  ├── deploy
│  │  ├── shared
│  │  │  ├── application.yml.template.erb
│  │  │  ├── database.yml.template.erb
│  │  │  ├── log_rotation.erb
│  │  │  ├── nginx.conf.erb
│  │  │  ├── puma.rb.erb
│  │  │  ├── puma_init.sh.erb
│  │  │  ├── secrets.yml.template.erb
│  │  ├── production.rb
│  │  └── staging.rb
│  └── deploy.rb
└── lib
   └── capistrano
      ├── substitute_strings.rb
      ├── tasks
      │  ├── check_revision.cap
      │  ├── compile_assets_locally.cap
      │  ├── db.cap
      │  ├── logs.cap
      │  ├── monit.cap
      │  ├── nginx.cap
      │  ├── puma.cap
      │  ├── push_deploy_tag.cap
      │  ├── run_tests.cap
      │  └── setup_config.cap
      └── template.rb
  • Put rails project's git url under :repo_url in 'config/deploy.rb' file.

Example:

#config/deploy.rb
set :repo_url, '[email protected]:user/repo.git'
  • Change application name under :application in 'config/deploy.rb' file.

Example:

#config/deploy.rb
set :application, 'demo_application'
  • Define servers in 'config/deploy/production.rb' and 'config/deploy/staging.rb'

Example:

server '192.168.33.10', user: fetch(:deploy_user).to_s, roles: %w(app db), primary: true
server '192.168.33.11', user: fetch(:deploy_user).to_s, roles: %w(app), primary: true
server '192.168.33.12', user: fetch(:deploy_user).to_s, roles: %w(app), primary: true
  • Set server name in 'config/deploy/production.rb' and 'config/deploy/staging.rb'

    Example:

# config/deploy/production.rb
set :server_names, {
  '192.168.33.10': '192.168.33.10 node0.server',
  '192.168.33.11': '192.168.33.11 node1.server',
  '192.168.33.12': '192.168.33.12 node2.server',
}
  • Set certificate and key path in 'config/deploy/production.rb' and 'config/deploy/staging.rb'g
set :nginx_certificate_path, "#{shared_path}/certificates/#{fetch(:stage)}.crt"
set :nginx_key_path, "#{shared_path}/certificates/#{fetch(:stage)}.key"

For different certificate and key name in different server

set :nginx_certificate_paths, {
  '192.168.33.10': "/etc/certificates/192_168_33_10.crt",
  '192.168.33.11': "/etc/certificates/192_168_33_11.crt",
  '192.168.33.12': "/etc/certificates/192_168_33_12.crt",
}
set :nginx_key_paths, {
  '192.168.33.10': "/etc/certificates/192_168_33_10.key",
  '192.168.33.11': "/etc/certificates/192_168_33_11.key",
  '192.168.33.12': "/etc/certificates/192_168_33_12.key",
}

Note: configuration key name changes from *_path to *_paths

Usage

  • Upload configurations
$ bundle exec cap production deploy:setup_config
  • Deploy
$ bundle exec cap production deploy

Contributing

Bug reports and pull requests are welcome on GitHub at puma-deploy repository. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md 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].