Replace eye with foreman.
This commit is contained in:
parent
fddfd8b8c0
commit
619722490c
6 changed files with 12 additions and 100 deletions
2
Gemfile
2
Gemfile
|
|
@ -185,7 +185,7 @@ group :production do # we don"t install these on travis to speed up test runs
|
||||||
|
|
||||||
# Process management
|
# Process management
|
||||||
|
|
||||||
gem "eye", "0.10.0"
|
gem "foreman", "0.88.1", require: false
|
||||||
|
|
||||||
# Redirects
|
# Redirects
|
||||||
|
|
||||||
|
|
|
||||||
33
Gemfile.lock
33
Gemfile.lock
|
|
@ -116,27 +116,6 @@ GEM
|
||||||
image_processing (~> 1.1)
|
image_processing (~> 1.1)
|
||||||
marcel (~> 1.0.0)
|
marcel (~> 1.0.0)
|
||||||
ssrf_filter (~> 1.0)
|
ssrf_filter (~> 1.0)
|
||||||
celluloid (0.17.4)
|
|
||||||
celluloid-essentials
|
|
||||||
celluloid-extras
|
|
||||||
celluloid-fsm
|
|
||||||
celluloid-pool
|
|
||||||
celluloid-supervision
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-essentials (0.20.5)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-extras (0.20.5)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-fsm (0.20.5)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-io (0.17.3)
|
|
||||||
celluloid (>= 0.17.2)
|
|
||||||
nio4r (>= 1.1)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-pool (0.20.5)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
celluloid-supervision (0.20.6)
|
|
||||||
timers (>= 4.1.1)
|
|
||||||
chrome_remote (0.3.0)
|
chrome_remote (0.3.0)
|
||||||
websocket-driver (~> 0.6)
|
websocket-driver (~> 0.6)
|
||||||
chunky_png (1.4.0)
|
chunky_png (1.4.0)
|
||||||
|
|
@ -237,12 +216,6 @@ GEM
|
||||||
ffi (>= 1.15.0)
|
ffi (>= 1.15.0)
|
||||||
excon (0.110.0)
|
excon (0.110.0)
|
||||||
execjs (2.9.1)
|
execjs (2.9.1)
|
||||||
eye (0.10.0)
|
|
||||||
celluloid (~> 0.17.3)
|
|
||||||
celluloid-io (~> 0.17.0)
|
|
||||||
kostya-sigar (~> 2.0.0)
|
|
||||||
state_machines
|
|
||||||
thor
|
|
||||||
fabrication (2.31.0)
|
fabrication (2.31.0)
|
||||||
factory_bot (6.4.6)
|
factory_bot (6.4.6)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
|
|
@ -291,6 +264,7 @@ GEM
|
||||||
fog-xml (0.1.4)
|
fog-xml (0.1.4)
|
||||||
fog-core
|
fog-core
|
||||||
nokogiri (>= 1.5.11, < 2.0.0)
|
nokogiri (>= 1.5.11, < 2.0.0)
|
||||||
|
foreman (0.88.1)
|
||||||
formatador (1.1.0)
|
formatador (1.1.0)
|
||||||
fugit (1.11.0)
|
fugit (1.11.0)
|
||||||
et-orbi (~> 1, >= 1.2.11)
|
et-orbi (~> 1, >= 1.2.11)
|
||||||
|
|
@ -380,7 +354,6 @@ GEM
|
||||||
multi_json
|
multi_json
|
||||||
jwt (2.8.1)
|
jwt (2.8.1)
|
||||||
base64
|
base64
|
||||||
kostya-sigar (2.0.10)
|
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
leaflet-rails (1.9.4)
|
leaflet-rails (1.9.4)
|
||||||
actionpack (>= 4.2.0)
|
actionpack (>= 4.2.0)
|
||||||
|
|
@ -710,7 +683,6 @@ GEM
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
ssrf_filter (1.1.2)
|
ssrf_filter (1.1.2)
|
||||||
state_machines (0.6.0)
|
|
||||||
string-direction (1.2.2)
|
string-direction (1.2.2)
|
||||||
strscan (3.1.0)
|
strscan (3.1.0)
|
||||||
swd (2.0.3)
|
swd (2.0.3)
|
||||||
|
|
@ -732,7 +704,6 @@ GEM
|
||||||
tilt (2.3.0)
|
tilt (2.3.0)
|
||||||
timecop (0.9.8)
|
timecop (0.9.8)
|
||||||
timeout (0.4.1)
|
timeout (0.4.1)
|
||||||
timers (4.3.5)
|
|
||||||
toml-rb (3.0.1)
|
toml-rb (3.0.1)
|
||||||
citrus (~> 3.0, > 3.0)
|
citrus (~> 3.0, > 3.0)
|
||||||
racc (~> 1.7)
|
racc (~> 1.7)
|
||||||
|
|
@ -820,7 +791,6 @@ DEPENDENCIES
|
||||||
diaspora_federation-json_schema (= 1.1.0)
|
diaspora_federation-json_schema (= 1.1.0)
|
||||||
diaspora_federation-rails (= 1.1.0)
|
diaspora_federation-rails (= 1.1.0)
|
||||||
diaspora_federation-test (= 1.1.0)
|
diaspora_federation-test (= 1.1.0)
|
||||||
eye (= 0.10.0)
|
|
||||||
factory_bot_rails (= 6.4.3)
|
factory_bot_rails (= 6.4.3)
|
||||||
faraday (= 2.9.0)
|
faraday (= 2.9.0)
|
||||||
faraday-cookie_jar (= 0.0.7)
|
faraday-cookie_jar (= 0.0.7)
|
||||||
|
|
@ -829,6 +799,7 @@ DEPENDENCIES
|
||||||
faraday-typhoeus (= 1.1.0)
|
faraday-typhoeus (= 1.1.0)
|
||||||
fixture_builder (= 0.5.2)
|
fixture_builder (= 0.5.2)
|
||||||
fog-aws (= 3.22.0)
|
fog-aws (= 3.22.0)
|
||||||
|
foreman (= 0.88.1)
|
||||||
fuubar (= 2.5.1)
|
fuubar (= 2.5.1)
|
||||||
gon (= 6.4.0)
|
gon (= 6.4.0)
|
||||||
haml_lint (= 0.58.0)
|
haml_lint (= 0.58.0)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
# This file was generated by Bundler.
|
# This file was generated by Bundler.
|
||||||
#
|
#
|
||||||
# The application 'eye' is installed as part of a gem, and
|
# The application 'foreman' is installed as part of a gem, and
|
||||||
# this file is here to facilitate running it.
|
# this file is here to facilitate running it.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||||
bundle_binstub = File.expand_path("bundle", __dir__)
|
bundle_binstub = File.expand_path("bundle", __dir__)
|
||||||
|
|
||||||
if File.file?(bundle_binstub)
|
if File.file?(bundle_binstub)
|
||||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
||||||
load(bundle_binstub)
|
load(bundle_binstub)
|
||||||
else
|
else
|
||||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||||
|
|
@ -24,4 +24,4 @@ end
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "bundler/setup"
|
require "bundler/setup"
|
||||||
|
|
||||||
load Gem.bin_path("eye", "eye")
|
load Gem.bin_path("foreman", "foreman")
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require_relative "load_config"
|
|
||||||
rails_env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
|
|
||||||
|
|
||||||
Eye.config do
|
|
||||||
logger Logger.new(STDOUT)
|
|
||||||
end
|
|
||||||
|
|
||||||
Eye.application("diaspora") do
|
|
||||||
working_dir Rails.root.to_s
|
|
||||||
env "RAILS_ENV" => rails_env
|
|
||||||
stdout "log/eye_processes_stdout.log" unless rails_env == "development"
|
|
||||||
stderr "log/eye_processes_stderr.log"
|
|
||||||
|
|
||||||
process :web do
|
|
||||||
web_command = "bin/puma -C config/puma.rb"
|
|
||||||
|
|
||||||
start_command web_command
|
|
||||||
daemonize true
|
|
||||||
restart_command "kill -USR2 {PID}"
|
|
||||||
restart_grace 10.seconds
|
|
||||||
|
|
||||||
pid_file AppConfig.server.pid.get
|
|
||||||
stop_signals [:TERM, 10.seconds]
|
|
||||||
|
|
||||||
monitor_children do
|
|
||||||
stop_command "kill -QUIT {PID}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
group :sidekiq do
|
|
||||||
AppConfig.server.sidekiq_workers.to_i.times do |i|
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
process "sidekiq#{i}" do
|
|
||||||
start_command "bin/bundle exec sidekiq"
|
|
||||||
daemonize true
|
|
||||||
pid_file "tmp/pids/sidekiq#{i}.pid"
|
|
||||||
stop_signals [:USR1, 0, :TERM, 10.seconds, :KILL]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -27,9 +27,8 @@ print_usage() {
|
||||||
print_usage_header "stop"
|
print_usage_header "stop"
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
echo; echo "Restart diaspora* using bin/eye (fast restart)"
|
echo; echo "Restart diaspora*"
|
||||||
print_usage_header "restart [options]" \
|
print_usage_header "restart"
|
||||||
" --full Restart entire container"
|
|
||||||
;;
|
;;
|
||||||
logs)
|
logs)
|
||||||
echo; echo "Follow log output of the running diaspora* instance"
|
echo; echo "Follow log output of the running diaspora* instance"
|
||||||
|
|
@ -148,7 +147,7 @@ print_usage_full() {
|
||||||
echo " setup Prepare diaspora* to run for development"
|
echo " setup Prepare diaspora* to run for development"
|
||||||
echo " start Start diaspora*"
|
echo " start Start diaspora*"
|
||||||
echo " stop Stop diaspora*"
|
echo " stop Stop diaspora*"
|
||||||
echo " restart Restart of diaspora*"
|
echo " restart Restart diaspora*"
|
||||||
echo " logs Follow log output of diaspora*"
|
echo " logs Follow log output of diaspora*"
|
||||||
echo " status Show current instance status of diaspora*"
|
echo " status Show current instance status of diaspora*"
|
||||||
echo " clean Reset diaspora* instance"
|
echo " clean Reset diaspora* instance"
|
||||||
|
|
@ -412,22 +411,8 @@ dia_pronto() {
|
||||||
}
|
}
|
||||||
|
|
||||||
dia_restart() {
|
dia_restart() {
|
||||||
# Restart diaspora inside container if already running; start new container otherwise
|
|
||||||
for i in "$@"; do
|
|
||||||
case "$i" in
|
|
||||||
--full)
|
|
||||||
dia_restart_full=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if dia_is_running; then
|
if dia_is_running; then
|
||||||
if [ -z $dia_restart_full ]; then
|
dia_docker_compose restart
|
||||||
dia_docker_compose exec \
|
|
||||||
diaspora \
|
|
||||||
bin/eye restart diaspora
|
|
||||||
else
|
|
||||||
dia_docker_compose restart
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
dia_start
|
dia_start
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -161,5 +161,5 @@ if [ -n "${ldconfig}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start Diaspora
|
# Start Diaspora
|
||||||
printf "Starting Diaspora in $RAILS_ENV mode with $workers Sidekiq worker(s)."
|
echo "Starting Diaspora in $RAILS_ENV mode with $workers Sidekiq worker(s)."
|
||||||
exec bin/bundle exec loader_eye --stop_all -c config/eye.rb
|
exec bin/foreman start -c -m all=1,sidekiq=$workers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue