mina config
This commit is contained in:
@ -1,21 +1,77 @@
|
||||
# config valid for current version and patch releases of Capistrano
|
||||
lock "~> 3.11.0"
|
||||
require 'mina/rails'
|
||||
require 'mina/git'
|
||||
require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
|
||||
|
||||
set :application, "ruby-x"
|
||||
set :repo_url, "https://github.com/ruby-x/ruby-x.github.io.git"
|
||||
#set :repo_url, "git@github.com:ruby-x/ruby-x.github.io.git"
|
||||
# Basic settings:
|
||||
# domain - The hostname to SSH to.
|
||||
# deploy_to - Path to deploy into.
|
||||
# repository - Git repo to clone from. (needed by mina/git)
|
||||
# branch - Branch name to deploy. (needed by mina/git)
|
||||
|
||||
# Default deploy_to directory is /var/www/my_app_name
|
||||
set :deploy_to, '/var/www/vhosts/rubydesign.fi/ruby-x.org'
|
||||
set :application_name, 'ruby-x'
|
||||
set :domain, '192.168.128.100'
|
||||
set :deploy_to, '/home/feenix/ruby-x'
|
||||
set :repository, "https://github.com/ruby-x/ruby-x.github.io.git"
|
||||
set :branch, 'master'
|
||||
|
||||
# Default value for :linked_files is []
|
||||
#append :linked_files, "config/database.yml"
|
||||
# Optional settings:
|
||||
set :user, 'feenix' # Username in the server to SSH to.
|
||||
# set :port, '30000' # SSH port number.
|
||||
# set :forward_agent, true # SSH forward_agent.
|
||||
|
||||
# Default value for linked_dirs is []
|
||||
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"
|
||||
# Shared dirs and files will be symlinked into the app-folder by the 'deploy:link_shared_paths' step.
|
||||
# Some plugins already add folders to shared_dirs like `mina/rails` add `public/assets`, `vendor/bundle` and many more
|
||||
# run `mina -d` to see all folders and files already included in `shared_dirs` and `shared_files`
|
||||
set :shared_dirs, fetch(:shared_dirs, []).push('tmp/pids' , 'tmp/sockets')
|
||||
set :shared_files, fetch(:shared_files, []).push('config/master.key')
|
||||
|
||||
# Default value for default_env is {}
|
||||
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
||||
# This task is the environment that is loaded for all remote run commands, such as
|
||||
# `mina deploy` or `mina rake`.
|
||||
task :remote_environment do
|
||||
# If you're using rbenv, use this to load the rbenv environment.
|
||||
# Be sure to commit your .ruby-version or .rbenv-version to your repository.
|
||||
invoke :'rbenv:load'
|
||||
|
||||
# Default value for local_user is ENV['USER']
|
||||
set :local_user, -> { 'rubydesign' }
|
||||
end
|
||||
|
||||
# Put any custom commands you need to run at setup
|
||||
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
|
||||
task :setup do
|
||||
# command %{rbenv install 2.5.3 --skip-existing}
|
||||
# command %{rvm install ruby-2.5.3}
|
||||
# command %{gem install bundler}
|
||||
end
|
||||
|
||||
desc "Deploys the current version to the server."
|
||||
task :deploy do
|
||||
# uncomment this line to make sure you pushed your local branch to the remote origin
|
||||
# invoke :'git:ensure_pushed'
|
||||
deploy do
|
||||
# Put things that will set up an empty directory into a fully set-up
|
||||
# instance of your project.
|
||||
invoke :'git:clone'
|
||||
invoke :'deploy:link_shared_paths'
|
||||
invoke :'bundle:install'
|
||||
invoke :'rails:assets_precompile'
|
||||
invoke :'deploy:cleanup'
|
||||
|
||||
on :launch do
|
||||
in_path(fetch(:current_path)) do
|
||||
invoke :'passenger:restart'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# you can use `run :local` to run tasks on local machine before of after the deploy scripts
|
||||
# run(:local){ say 'done' }
|
||||
end
|
||||
|
||||
namespace :passenger do
|
||||
desc "Restart Passenger"
|
||||
task :restart do
|
||||
command %{
|
||||
echo "-----> Restarting passenger"
|
||||
#{echo_cmd %[touch tmp/restart.txt]}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -1,44 +0,0 @@
|
||||
# server-based syntax
|
||||
# ======================
|
||||
# Defines a single server with a list of roles and multiple properties.
|
||||
# You can define all roles on a single server, or split them:
|
||||
|
||||
server 'ruby-x.org', user: 'rubydesign', roles: %w{app db web}
|
||||
|
||||
|
||||
# Configuration
|
||||
# =============
|
||||
# You can set any configuration variable like in config/deploy.rb
|
||||
# These variables are then only loaded and set in this stage.
|
||||
# For available Capistrano configuration variables see the documentation page.
|
||||
# http://capistranorb.com/documentation/getting-started/configuration/
|
||||
# Feel free to add new variables to customise your setup.
|
||||
|
||||
|
||||
|
||||
# Custom SSH Options
|
||||
# ==================
|
||||
# You may pass any option but keep in mind that net/ssh understands a
|
||||
# limited set of options, consult the Net::SSH documentation.
|
||||
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
|
||||
#
|
||||
# Global options
|
||||
# --------------
|
||||
# set :ssh_options, {
|
||||
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
||||
# forward_agent: false,
|
||||
# auth_methods: %w(password)
|
||||
# }
|
||||
#
|
||||
# The server-based syntax can be used to override options:
|
||||
# ------------------------------------
|
||||
# server "example.com",
|
||||
# user: "user_name",
|
||||
# roles: %w{web app},
|
||||
# ssh_options: {
|
||||
# user: "user_name", # overrides user setting above
|
||||
# keys: %w(/home/user_name/.ssh/id_rsa),
|
||||
# forward_agent: false,
|
||||
# auth_methods: %w(publickey password)
|
||||
# # password: "please use keys"
|
||||
# }
|
@ -1,61 +0,0 @@
|
||||
# server-based syntax
|
||||
# ======================
|
||||
# Defines a single server with a list of roles and multiple properties.
|
||||
# You can define all roles on a single server, or split them:
|
||||
|
||||
# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value
|
||||
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
|
||||
# server "db.example.com", user: "deploy", roles: %w{db}
|
||||
|
||||
|
||||
|
||||
# role-based syntax
|
||||
# ==================
|
||||
|
||||
# Defines a role with one or multiple servers. The primary server in each
|
||||
# group is considered to be the first unless any hosts have the primary
|
||||
# property set. Specify the username and a domain or IP for the server.
|
||||
# Don't use `:all`, it's a meta role.
|
||||
|
||||
# role :app, %w{deploy@example.com}, my_property: :my_value
|
||||
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
||||
# role :db, %w{deploy@example.com}
|
||||
|
||||
|
||||
|
||||
# Configuration
|
||||
# =============
|
||||
# You can set any configuration variable like in config/deploy.rb
|
||||
# These variables are then only loaded and set in this stage.
|
||||
# For available Capistrano configuration variables see the documentation page.
|
||||
# http://capistranorb.com/documentation/getting-started/configuration/
|
||||
# Feel free to add new variables to customise your setup.
|
||||
|
||||
|
||||
|
||||
# Custom SSH Options
|
||||
# ==================
|
||||
# You may pass any option but keep in mind that net/ssh understands a
|
||||
# limited set of options, consult the Net::SSH documentation.
|
||||
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
|
||||
#
|
||||
# Global options
|
||||
# --------------
|
||||
# set :ssh_options, {
|
||||
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
||||
# forward_agent: false,
|
||||
# auth_methods: %w(password)
|
||||
# }
|
||||
#
|
||||
# The server-based syntax can be used to override options:
|
||||
# ------------------------------------
|
||||
# server "example.com",
|
||||
# user: "user_name",
|
||||
# roles: %w{web app},
|
||||
# ssh_options: {
|
||||
# user: "user_name", # overrides user setting above
|
||||
# keys: %w(/home/user_name/.ssh/id_rsa),
|
||||
# forward_agent: false,
|
||||
# auth_methods: %w(publickey password)
|
||||
# # password: "please use keys"
|
||||
# }
|
Reference in New Issue
Block a user