This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Capfile | |
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
require 'capistrano/deploy' | |
require "capistrano/scm/git" | |
install_plugin Capistrano::SCM::Git | |
require 'capistrano/rails' | |
require 'capistrano/bundler' | |
require 'capistrano/rbenv' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
group :development do | |
gem 'capistrano', require: false | |
gem 'capistrano-rbenv', require: false | |
gem 'capistrano-rails', require: false | |
gem 'capistrano-bundler', require: false | |
gem 'capistrano3-puma', require: false | |
gem 'capistrano-sidekiq', require: false | |
end | |
gem ‘puma’ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/application.yml | |
development: | |
secret_key_base: something_secret | |
test: | |
secret_key_base: something_else_secret | |
production: | |
SECRET_KEY_BASE: something_else_secret_generate_from_rails_secret | |
PG_DBNAME: ProductionDBName | |
PG_USERNAME: deploy | |
PG_PASSWORD: YourPostgresPassword |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/database.yml | |
default: &default | |
adapter: postgresql | |
encoding: unicode | |
pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %> | |
development: | |
<<: *default | |
database: AppName_development | |
test: | |
<<: *default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/nginx.conf | |
upstream puma { | |
server unix:///home/deploy/apps/AppName/shared/tmp/sockets/puma.sock; | |
} | |
server { | |
listen 80 default_server deferred; | |
server_name DomainName; | |
# if you only use a static ip address | |
# listen 80; | |
# server_name <STATIC IP ADDRESS>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/deploy.rb | |
lock '3.11.0' # Edit this to match your capistrano version | |
set :application, 'AppName' | |
set :repo_url, '[email protected]:GitHubUserName/AppName.git' # Edit this to match your repository | |
set :branch, :master | |
set :deploy_to, '/home/deploy/apps/AppName' | |
set :linked_files, %w{config/database.yml config/application.yml config/secrets.yml} | |
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads} | |
set :bundle_binstubs, nil |
NewerOlder