deployinator 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,6 @@ def deploy_run_bluepill(host)
|
|
71
71
|
warn "Starting a new container named #{fetch(:ruby_container_name)} on #{host}"
|
72
72
|
execute(
|
73
73
|
"docker", "run", "--tty", "--detach",
|
74
|
-
# "--user", fetch(:webserver_username), TODO find out of this can run as the deployer user instead of root, if so, set the user, if not, fix rails console to su to www-data first
|
75
74
|
"--name", fetch(:ruby_container_name),
|
76
75
|
"-e", "APP_STAGE=#{fetch(:stage)}",
|
77
76
|
"-e", "RAILS_ROOT=#{current_path}",
|
@@ -136,13 +135,11 @@ def deploy_run_cadvisor(host)
|
|
136
135
|
"google/cadvisor:latest"
|
137
136
|
)
|
138
137
|
end
|
139
|
-
# TODO change these both to run as webserver_username
|
140
|
-
# also offer Rails 2.X versions
|
141
138
|
def deploy_rails_console(host)
|
142
139
|
[
|
143
140
|
"ssh", "-t", "#{host}", "\"docker", "exec", "--interactive", "--tty",
|
144
141
|
fetch(:ruby_container_name),
|
145
|
-
# "sudo", "-u", fetch(:webserver_username), TODO,
|
142
|
+
# "sudo", "-u", fetch(:webserver_username), TODO, make sure it works to add this line
|
146
143
|
"bash", "-c", "'cd", current_path, "&&",
|
147
144
|
shared_path.join('bundle', 'bin', 'rails'),
|
148
145
|
"console", "#{fetch(:rails_env)}'\""
|
data/lib/deployinator/config.rb
CHANGED
@@ -13,7 +13,6 @@ end
|
|
13
13
|
|
14
14
|
namespace :deployinator do
|
15
15
|
task :load_settings do
|
16
|
-
load "./config/deploy.rb"
|
17
16
|
SSHKit.config.output_verbosity = fetch(:log_level)
|
18
17
|
end
|
19
18
|
|
@@ -108,7 +107,11 @@ namespace :deployinator do
|
|
108
107
|
task :file_permissions => [:load_settings, :deployment_user, :webserver_user] do
|
109
108
|
on roles(:app) do
|
110
109
|
as :root do
|
111
|
-
|
110
|
+
if ENV["skip_perms"] == "true"
|
111
|
+
warn "Skipping file_permissions task"
|
112
|
+
else
|
113
|
+
setup_file_permissions
|
114
|
+
end
|
112
115
|
end
|
113
116
|
end
|
114
117
|
end
|
@@ -8,9 +8,9 @@ set :application, 'my_app_name'
|
|
8
8
|
set :preexisting_ssh_user, ENV['USER']
|
9
9
|
set :deployment_username, "deployer" # user with SSH access and passwordless sudo rights
|
10
10
|
set :webserver_username, "www-data" # less trusted web server user with limited write permissions
|
11
|
-
set :database_name, "db_name"
|
12
|
-
set :database_username, "db_username"
|
13
|
-
set :database_password, "db_password"
|
11
|
+
set :database_name, "db_name" # for templates/deploy/database.yml
|
12
|
+
set :database_username, "db_username" # for templates/deploy/database.yml
|
13
|
+
set :database_password, "db_password" # for templates/deploy/database.yml
|
14
14
|
# All permissions changes are recursive, and unless overridden below,
|
15
15
|
# all folders will be "deployer www-data drwxr-s---",
|
16
16
|
# all files will be "deployer www-data -rw-r-----"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deployinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|