私は、エラスティック Beanstalk インスタンス内で実行するように地平線を設定しようとしましたが、うまくいくようです。
supervisorctl status
次の出力が得られます
horizon RUNNING pid 3435, uptime 0:06:31
しかし、ログは正常な開始を出力し、エラーメッセージをループしてキューが機能していません
Horizon started successfully.
sh: line 0: exec: : not found
sh: line 0: exec: : not found <------ This prints like an infinite loop
ssh シェルから手動で開始すると、Horizon キューは機能します。
これが私のEBSの構成ファイルです
001-cron.config
files:
"/etc/cron.d/mycron":
mode: "000644"
owner: root
group: root
content: |
* * * * * root php /var/app/current/artisan schedule:run
002-horizon.config
container_commands:
01-copy_systemd_file:
command: "easy_install supervisor"
02-enable_systemd:
command: "mkdir -p /etc/supervisor/conf.d"
03-copy_horizon_config:
command: "cp .ebextensions/horizon.conf /etc/supervisor/conf.d/horizon.conf"
cwd: "/var/app/ondeck"
04-copy_supervidor_config:
command: "cp .ebextensions/supervisord.conf /etc/supervisord.conf"
cwd: "/var/app/ondeck"
05-touch_log:
command: "mkdir -p /var/log/supervisor/ && touch /var/log/supervisor/supervisord.log"
06-run_supervisor:
command: "/usr/local/bin/supervisord -c /etc/supervisord.conf || true"
07-run_process:
command: "/usr/local/bin/supervisorctl restart horizon:*"
08-get_status:
command: "/usr/local/bin/supervisorctl status"
地平線.conf
[program:horizon]
process_name=%(program_name)s
command=php /var/app/current/artisan horizon
autostart=true
autorestart=true
user=ec2-user
redirect_stderr=true
stdout_logfile=/var/log/horizon.log
Supervisord.conf
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
; Change according to your configurations