質問編集履歴
2
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -97,6 +97,60 @@
|
|
97
97
|
linked file /home/deploy/staging/shared/config/secrets.yml does not exist on xxx.xx.xxx.xx
|
98
98
|
```
|
99
99
|
|
100
|
+
【deploy/staging.rb】
|
101
|
+
```
|
102
|
+
set :pty, true
|
103
|
+
server '160.16.198.30', user: 'deploy', roles: %w{app db web}
|
104
|
+
|
105
|
+
|
106
|
+
shared_path = "/home/deploy/staging/shared"
|
107
|
+
set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn.pid"
|
108
|
+
set :unicorn_options, -> { "--path /staging" }
|
109
|
+
set :unicorn_exec, -> { "unicorn_rails" }
|
110
|
+
```
|
111
|
+
|
112
|
+
【config/deploy.rb】
|
113
|
+
```ここに言語を入力
|
114
|
+
lock '3.7.1'
|
115
|
+
|
116
|
+
set :application, 'third_app'
|
117
|
+
set :repo_url, 'git@bitbucket.org:sagaekeiga/third_app.git'
|
118
|
+
set :git_https_username, 'sagaekeiga'
|
119
|
+
set :deploy_to, '/home/deploy'
|
120
|
+
set :pty, true
|
121
|
+
set :rbenv_ruby, '2.3.1'
|
122
|
+
set :rbenv_type, :system
|
123
|
+
set :ssh_options, {
|
124
|
+
user: 'deploy',
|
125
|
+
port: 61203
|
126
|
+
}
|
127
|
+
set :ssh_options, :port => "61203"
|
128
|
+
set forward_agent: true
|
129
|
+
|
130
|
+
|
131
|
+
set :unicorn_rack_env, "none"
|
132
|
+
set :unicorn_config_path, 'config/unicorn.rb'
|
133
|
+
|
134
|
+
set :scm, :git
|
135
|
+
set :keep_releases, 5
|
136
|
+
|
137
|
+
set :default_env, {
|
138
|
+
rbenv_root: "/usr/local/rbenv",
|
139
|
+
path: "usr/local/rbenv/shims:/usr/local/rbenv/bin:$PATH"
|
140
|
+
}
|
141
|
+
|
142
|
+
set :rails_env, :staging
|
143
|
+
|
144
|
+
after 'deploy:publishing', 'deploy:restart'
|
145
|
+
namespace :deploy do
|
146
|
+
desc 'Restart application'
|
147
|
+
task :restart do
|
148
|
+
invoke 'unicorn:restart'
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
|
153
|
+
```
|
100
154
|
gitからサーバに送られません…
|
101
155
|
|
102
156
|
###環境
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -97,4 +97,9 @@
|
|
97
97
|
linked file /home/deploy/staging/shared/config/secrets.yml does not exist on xxx.xx.xxx.xx
|
98
98
|
```
|
99
99
|
|
100
|
-
gitからサーバに送られません…
|
100
|
+
gitからサーバに送られません…
|
101
|
+
|
102
|
+
###環境
|
103
|
+
cloud9
|
104
|
+
ubuntu
|
105
|
+
CentOS 6.8
|