0
나는이 옵션 배포 사용하여 카피 스트라 노를 통해 VPS에 내 응용 프로그램을 배포 한 :카피 스트라 노 배포 비활성화 생산 응용 프로그램
lock '3.4.1'
set :application, 'my-production-app'
set :repo_url, 'https://path.to.my.repo/my-production-app.git'
set :linked_dirs, %w(
bin log vendor/bundle public/system
tmp/pids tmp/cache tmp/sockets
)
set :puma_threads, [4, 16]
set :puma_workers, 0
# This for carrierwave
set :linked_dirs, fetch(:linked_dirs) + %w{public/system public/uploads}
set :pty, true
set :use_sudo, true
set :puma_bind, "unix://#{shared_path}/tmp/sockets/#{fetch(:application)}-puma.sock"
set :puma_state, "#{shared_path}/tmp/pids/puma.state"
set :puma_pid, "#{shared_path}/tmp/pids/puma.pid"
set :puma_access_log, "#{release_path}/log/puma.error.log"
set :puma_error_log, "#{release_path}/log/puma.access.log"
set :puma_preload_app, true
set :puma_worker_timeout, nil
을 그 때 나는이 웹 서버로 작업 할과 nginx.conf
파일 :
upstream puma_powerwifi {
server unix:///var/www/my-production-app/shared/tmp/sockets/my-production-app-puma.sock;
}
server {
listen 8888;
# server_name example.com;
root /var/www/my-production-app/current/public;
access_log /var/www/my-production-app/current/log/nginx.access.log;
error_log /var/www/my-production-app/current/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma_my_production;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}
내 응용 프로그램을 내 서버에 배포하면 제대로 작동합니다. 지금 나는 그것을 끄고 싶지 않고 나는 어떻게하는지 모른다.
capistrano를 통해 배포 된 레일 프로덕션 응용 프로그램을 안전하게 비활성화하는 방법은 무엇입니까?