DevOps
9
Вклад в тег
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
- в зависимости от ENV выбирался docker-compose.{env}.yaml и dockerfile.{env} для каждого из контейнеров (если сборка из директории, а не из образа)
docker build --build-arg ENV=stage .
# Use Capistrano for deployment
group :development do
gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
gem 'capistrano-passenger'
gem 'capistrano-bower'
end
bundle exec cap install
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/bower'
require 'capistrano/passenger'
# config valid only for current version of Capistrano
lock '3.3.5'
set :application, 'my_awesome_site'
set :repo_url, 'git@bitbucket.org:username/my_awesome_site.git'
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/user/www/#{fetch(:application)}"
# Default value for :scm is :git
set :scm, :git
role :app, %w{myhosting.ru}
role :web, %w{myhosting.ru}
role :db, %w{myhosting.ru}
# Extended Server Syntax
# ======================
# This can be used to drop a more detailed server definition into the
# server list. The second argument is a, or duck-types, Hash and is
# used to set extended properties on the server.
server 'myhosting.ru', user: 'user', roles: %w{web app db}
set :rails_env, 'production'
set :rvm_type, :user # Defaults to: :auto
set :rvm_ruby_version, '2.1.4@r4' # Defaults to: 'default'
bundle exec cap production deploy:check
и долго долго делать bundle exec cap production deploy
отлавливая ошибки деплоя и исправляя их :)