Skip to content

Instantly share code, notes, and snippets.

@JonatanFlores
Last active June 16, 2021 12:43
Show Gist options
  • Save JonatanFlores/52767eda5731d5bcbe3f7eb49af4e051 to your computer and use it in GitHub Desktop.
Save JonatanFlores/52767eda5731d5bcbe3f7eb49af4e051 to your computer and use it in GitHub Desktop.
Configurar Supervisor e Laravel no Centos 7

Configurando supervisor

Remove o supervisor, caso já esteja instalado (OPCIONAL)

$ yum remove supervisor

Atualiza o repositório

$ yum install epel-release

Instala o supervisor

$ yum install supervisor

Atualiza o CENTOS (OPCIONAL)

$ yum update

Cria um arquivo de configuração do Programa

SEMPRE BOM EVITAR CONFIGURAR DIRETAMENTE NO ARQUIVO: /etc/supervisord.d

$ vim /etc/supervisord.d/laravel-worker.ini

Conteúdo do arquivo

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/pusher/artisan websockets:serve
autostart=true
autorestart=true
startsecs=3
startretries=3
user=apache
numprocs=8
redirect_stderr=true
stdout_logfile=/home/pusher/storage/logs/worker.log

Comandos do supervisord

Inicia o supervisord

$ systemctl start supervisord

Para o supervisord

$ systemctl stop supervisord

Reiniciar o supervisord

$ systemctl restart supervisord

Checar a situação dos programas sendo executados:

$ systemctl status supervisord

Adiciona o serviço na inicialização

$ systemctl enable supervisord
@geangeowle
Copy link

Adiciona o serviço na inicialização

$ systemctl enable supervisord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment