Роман Мирр, здравствуйте, не подскажите, как стартануть приложение
/etc/nginx/conf.d/coins.conf
server {
listen 80;
server_name 192.168.5.100;
# Tell Nginx and Passenger where your app's 'public' directory is
root /var/www/coins/public;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /usr/local/rvm/gems/ruby-2.5.0/wrappers/ruby;
}
Gemfile
gem 'bcrypt', git: 'git@github.com:codahale/bcrypt-ruby.git'
gem 'rack-cors'
gem 'jwt'
gem 'rails', '~> 5.1.5'
gem 'pg'
group :development, :test do
gem 'dotenv-rails'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'whenever', require: false
gem 'passenger', require: "phusion_passenger/rack_handler"
но почему-то не грузиться
sudo /usr/sbin/passenger-memory-stats
но если стартануть вручную, то запускается passenger start
=============== Phusion Passenger Standalone web server started ===============
PID file: /var/www/coins/tmp/pids/passenger.3000.pid
Log file: /var/www/coins/log/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
App 4907 stdout:
[ N 2018-04-09 21:09:22.5019 4876/T7 age/Cor/SecurityUpdateChecker.h:517 ]: Security update check: no update found (next check in 24 hours)
App 4922 stdout:
Started HEAD "/" for 127.0.0.1 at 2018-04-09 21:09:25 +0300
файл /var/log/nginx/error.log
[ N 2018-04-09 20:40:21.5847 3700/T5 age/Cor/CoreMain.cpp:616 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2018-04-09 20:40:21.5848 3700/T1 age/Cor/CoreMain.cpp:1161 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2018-04-09 20:40:21.5849 3700/T9 Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2018-04-09 20:40:21.5850 3700/T9 Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2018-04-09 20:40:21.5850 3700/T5 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2018-04-09 20:40:21.5850 3700/T5 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2018-04-09 20:40:21.6068 3700/T1 age/Cor/CoreMain.cpp:1234 ]: Passenger core shutdown finished
[ N 2018-04-09 20:40:22.6735 3986/T1 age/Wat/WatchdogMain.cpp:1258 ]: Starting Passenger watchdog...
[ N 2018-04-09 20:40:22.7088 3989/T1 age/Cor/CoreMain.cpp:1249 ]: Starting Passenger core...
[ N 2018-04-09 20:40:22.7090 3989/T1 age/Cor/CoreMain.cpp:252 ]: Passenger core running in multi-application mode.
[ N 2018-04-09 20:40:22.7162 3989/T1 age/Cor/CoreMain.cpp:984 ]: Passenger core online, PID 3989
[ N 2018-04-09 20:40:25.3016 3989/T7 age/Cor/SecurityUpdateChecker.h:517 ]: Security update check: no update found (next check in 24 hours)
может где-то нужно прописать еще автостарт приложения? Не могу нагуглить. Спасибо.
Богдан, извини, нет пока возможности ответить развернуто. Попробуй проверить что верно выставлены пути к Ruby.
passenger-status
+
passenger-config about -h
+
passenger-memory-stats
Роман Мирр, сенкс, поднял я его. Теперь вопрос, а как теперь этот Nginx/Passenger в докер впихнуть. Вроде там все так взаимосвязано что там нужен 1 контейнер, хотя по идеи их должно быть два, один для Nginx, а другой для Rails