Deployment Puma不创建插座“;抽芯短袜“;部署mina rails时在定义的位置

Deployment Puma不创建插座“;抽芯短袜“;部署mina rails时在定义的位置,deployment,server,puma,ruby-on-rails-5.2,Deployment,Server,Puma,Ruby On Rails 5.2,我正在使用minadeploy部署我的源代码,但是puma服务器未启动,并且pumactl.sock未创建此文件 deploy.rb require 'mina/bundler' require 'mina/puma' require 'mina/rails' require 'mina/git' require 'mina/rbenv' set :rails_env, 'production' set :application_name, 'testapp' set :domain, ENV

我正在使用
mina
deploy部署我的源代码,但是
puma
服务器未启动,并且
pumactl.sock
未创建此文件

deploy.rb

require 'mina/bundler'
require 'mina/puma'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'

set :rails_env, 'production'
set :application_name, 'testapp'
set :domain, ENV['DOMAIN']
set :deploy_to, '/var/www/html/testapp'
set :repository, 'git@example.com/test.git'
set :branch, 'working_code'
set :user, ENV['DEPLOY_USER']

set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/pids', 'tmp/sockets', 'public/uploads','tmp/log')
set :shared_files, fetch(:shared_files, []).push('config/master.key')
task :remote_environment do
  invoke :'rbenv:load'
end

# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.

desc "Deploys the current version to the server."
task :deploy do
  deploy do
    comment "Deploying to #{fetch(:application_name)} to #{fetch(:domain)}: #{fetch(:deploy_to)}"
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'
    invoke :'rails:db_migrate'
    invoke :'rails:assets_precompile'
    invoke :'deploy:cleanup'

    on :launch do
      in_path(fetch(:current_path)) do
        command %{mkdir -p tmp/}
        command %{touch tmp/restart.txt}
        #invoke :'puma:phased_restart'
        invoke :'puma:restart'
      end
    end
  end
end
美洲狮

threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
#
port        ENV.fetch("PORT") { 3000 }
# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }

# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart
if ENV.fetch('RAILS_ENV') == 'production'
    bind  "unix:///var/www/html/testapp/shared/tmp/sockets/puma.sock"
    pidfile "/var/www/html/testapp/shared/tmp/pids/puma.pid"
    state_path "/var/www/html/testapp/shared/tmp/sockets/puma.state"
    directory "/var/www/html/testapp/current"
    daemonize true
    activate_control_app 'unix:///var/www/html/testapp/shared/tmp/sockets/pumactl.sock'
    stdout_redirect "/home/ubuntu/var/www/html/testapp/shared/tmp/log/stdout", "/home/ubuntu/var/www/html/testapp/shared/tmp/log/stderr"
    prune_bundler
end