-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathafter.sh
More file actions
executable file
·97 lines (76 loc) · 3.1 KB
/
after.sh
File metadata and controls
executable file
·97 lines (76 loc) · 3.1 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
# 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.
# Install phpmyadmin
if [ ! -d ".etc/phpmyadmin" ] && [ ! -f ".etc/phpmyadmin/index.php" ]; then
sudo apt-get install unzip
wget https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.zip
unzip phpMyAdmin-5.2.1-all-languages.zip -d ~//noix/.etc/
sudo mv ~//noix/.etc/phpMyAdmin-5.2.1-all-languages ~//noix/.etc/phpmyadmin
sudo rm -rf phpMyAdmin-5.2.1-all-languages.zip ~//noix/.etc/phpMyAdmin-5.2.1-all-languages
touch /etc/phpmyadmin/.gitkeep
fi
# COPY MYSQL CONFIG
sudo cp -r /home/vagrant/noix/.etc/mysql/my.cnf /etc/mysql/
# Copy SSL Certificates
sudo cp -r /etc/ssl/certs/ca.homestead.noix.crt /home/vagrant/noix/.etc/ssl
# Set PHP version
sudo update-alternatives --set php /usr/bin/php8.3
sudo update-alternatives --set phar /usr/bin/phar8.3
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.3
sudo phpenmod xdebug
sudo apt install cron -y
sudo apt install php-gmp
sudo apt install php-bcmath
sudo apt install php-igbinary
sudo apt install libc-ares-dev libcurl4-openssl-dev libbrotli-dev
sudo apt remove --purge php5.*-* php7.*-* php8.0-* php8.1-* php8.2-* -y
sudo rm -rf /etc/php/5.* /etc/php/7.* /etc/php/8.0 /etc/php/8.1 /etc/php/8.2
sudo pecl install yaml
sudo apt install php8.3-yaml php8.3-amqp php8.3-igbinary php8.3-redis
# Redis
sudo add-apt-repository ppa:redislabs/redis -y
# CLAMAV
#sudo apt-get install -y clamav-daemon
#sudo freshclam
#sudo systemctl enable --now clamav-daemon clamav-freshclam
#sudo systemctl enable clamav-daemon
# Install new version beanstalkd, for queue on prod test
wget https://launchpad.net/ubuntu/+archive/primary/+files/beanstalkd_1.12-2_amd64.deb
sudo dpkg -i beanstalkd_1.12-2_amd64.deb
sudo rm -rf beanstalkd_1.12-2_amd64.deb
# NGINX
sudo apt install nginx-extras -y
sudo add-apt-repository ppa:ondrej/nginx -y
if [ -f ".etc/nginx/-api.loc" ]; then
sudo cp -r /home/vagrant/noix/.etc/nginx/-api.loc /etc/nginx/sites-available/
sudo cp -r /home/vagrant/noix/.etc/nginx/-api.phpmyadmin.loc /etc/nginx/sites-available/
fi
# SUPERVISOR
pip install --upgrade supervisor
pip install superlance
sudo cp -r /home/vagrant/noix/.etc/supervisor/queue-base.conf /etc/supervisor/conf.d/
sudo cp -r /home/vagrant/noix/.etc/supervisor/schedule.conf /etc/supervisor/conf.d/
sudo cp -r /home/vagrant/noix/.etc/supervisor/horizon.conf /etc/supervisor/conf.d/
sudo supervisorctl reread
sudo supervisorctl restart all
sudo apt update -y
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
sudo apt autoremove -y
sudo apt autoclean -y
# Project settings commands
cd /home/vagrant/noix || exit
composer install
php artisan migrate
php artisan optimize:clear
php artisan vendor:publish --tag=log-viewer-assets --force
php artisan l5-swagger:generate
php artisan cache:clear
cd public || exit
unlink storage
ln -s ../storage/app/public storage