-
Notifications
You must be signed in to change notification settings - Fork 0
/
after.sh
46 lines (37 loc) · 1.34 KB
/
after.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
#
# If you have user-specific configurations you would like
# to apply, you may also create user-customizations.sh,
# which will be run after this script.
# If you're not quite ready for Node 12.x
# Uncomment these lines to roll back to
# v11.x or v10.x
# Remove Node.js v12.x:
#sudo apt-get -y purge nodejs
#sudo rm -rf /usr/lib/node_modules/npm/lib
#sudo rm -rf //etc/apt/sources.list.d/nodesource.list
# Install Node.js v11.x
#curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Install Node.js v10.x
#curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Add the laravel queue worker to supervisord
if sudo [ ! -f /etc/supervisor/conf.d/laravel-worker.conf ]; then
cat << EOF | sudo tee /etc/supervisor/conf.d/laravel-worker.conf >/dev/null
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/code/artisan queue:work --queue=deployer
autostart=true
autorestart=true
user=vagrant
numprocs=8
redirect_stderr=true
stdout_logfile=/home/vagrant/code/storage/logs/laravel-worker.log
EOF
sudo supervisorctl reread
sudo supervisorctl update
fi