Config deploy for production

This commit is contained in:
Jesse C. Fisher 2019-10-29 03:18:24 -07:00
parent b6d87b63b4
commit 6a6bfea612
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
set :application, "thirteen_tien_len_#{fetch(:stage)}" set :application, "thirteen_tien_len_#{fetch(:stage)}"
set :repo_url, 'git@bitbucket.org:jessecfisher/thirteen-tien-len.git' set :repo_url, 'gogs@git.quaff.top:Jesse/thirteen-tien-len.git'
# If you want to import assets, you can change default asset dir (default = system) # If you want to import assets, you can change default asset dir (default = system)
# This directory must be in your shared directory on the server # This directory must be in your shared directory on the server
@ -9,7 +9,7 @@ set :assets_dir, %w(public/assets public/system)
#set :branch, proc { `git rev-parse --abbrev-ref stash`.chomp } #set :branch, proc { `git rev-parse --abbrev-ref stash`.chomp }
#ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } #ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
set :deploy_to, "/home/jesse/web/thirteen-tien-len_#{fetch(:stage)}" set :deploy_to, "/home/jesse/srv/thirteen-tien-len_#{fetch(:stage)}"
# set :scm, :git # set :scm, :git
# set :format, :pretty # set :format, :pretty
@ -20,7 +20,7 @@ set :linked_files, %w{config/database.yml .env}
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/lift-calculator} set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/lift-calculator}
set :rbenv_type, :user # or :system, depends on your rbenv setup set :rbenv_type, :user # or :system, depends on your rbenv setup
set :rbenv_ruby, '2.3.0' set :rbenv_ruby, '2.6.0'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec" set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails} set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value set :rbenv_roles, :all # default value
@ -32,8 +32,8 @@ set :nginx_path, '/etc/nginx' # directory containing sites-available and sites-e
set :nginx_template, 'config/deploy/nginx_conf.erb' # configuration template set :nginx_template, 'config/deploy/nginx_conf.erb' # configuration template
#set :nginx_server_name, 'example.com' # optional, defaults to :application #set :nginx_server_name, 'example.com' # optional, defaults to :application
#set :nginx_upstream, 'example-app' # optional, defaults to :application #set :nginx_upstream, 'example-app' # optional, defaults to :application
set :nginx_listen, 80 # optional, default is not set # set :nginx_listen, 80 # optional, default is not set
set :nginx_roles, :all # set :nginx_roles, :all
## postgresql ## postgresql
set :pg_user, "thirteen_tien_len_#{fetch(:stage)}" set :pg_user, "thirteen_tien_len_#{fetch(:stage)}"

View File

@ -1,15 +1,15 @@
set :stage, :production set :stage, :production
set :nginx_server_name, 'tienlen.ga' # optional, defaults to :application set :nginx_server_name, '13.owlephant.icu' # optional, defaults to :application
# Simple Role Syntax # Simple Role Syntax
# ================== # ==================
# Supports bulk-adding hosts to roles, the primary # Supports bulk-adding hosts to roles, the primary
# server in each group is considered to be the first # server in each group is considered to be the first
# unless any hosts have the primary property set. # unless any hosts have the primary property set.
role :app, %w{jesse@tienlen.ga} role :app, %w{jesse@13.owlephant.icu}
role :web, %w{jesse@tienlen.ga} role :web, %w{jesse@13.owlephant.icu}
role :db, %w{jesse@tienlen.ga} role :db, %w{jesse@13.owlephant.icu}
# Extended Server Syntax # Extended Server Syntax
# ====================== # ======================
@ -17,7 +17,7 @@ role :db, %w{jesse@tienlen.ga}
# definition into the server list. The second argument # definition into the server list. The second argument
# something that quacks like a hash can be used to set # something that quacks like a hash can be used to set
# extended properties on the server. # extended properties on the server.
server 'tienlen.ga', user: 'jesse', roles: %w{web app db}, my_property: :my_value server '13.owlephant.icu', user: 'jesse', roles: %w{web app db}, my_property: :my_value
# you can set custom ssh options # you can set custom ssh options
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options # it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options