Skip to content

Commit

Permalink
Merge branch 'main' of github.com:laravel/homestead into main
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Feb 26, 2021
2 parents 980727c + 646f19e commit 333ebe7
Show file tree
Hide file tree
Showing 23 changed files with 167 additions and 10 deletions.
5 changes: 2 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ Ubuntu 20.04 can be found in the branch `20.04`

| Ubuntu LTS | Settler Version | Homestead Version | Branch | Status
| -----------| ----------- | ----------- | ----------- | -----------
| 20.04 | TBD | TBD | `main` | Development/Unstable
| 20.04 | 10.x | 11.x | `20.04` | Supported
| 18.04 | 9.x | 10.x | `release` | No Longer Supported
| 20.04 | 11.x | 12.x | `main` | Development/Unstable
| 20.04 | 11.x | 12.x | `release` | Stable

## Developing Homestead

Expand Down
2 changes: 1 addition & 1 deletion scripts/features/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ touch /home/$WSL_USER_NAME/.homestead-features/golang
chown -Rf $WSL_USER_NAME:$WSL_USER_GROUP /home/$WSL_USER_NAME/.homestead-features

# Install Golang
golangVersion="1.15.7"
golangVersion="1.16"
wget https://dl.google.com/go/go${golangVersion}.linux-amd64.tar.gz -O golang.tar.gz
tar -C /usr/local -xzf golang.tar.gz go
printf "\nPATH=\"/usr/local/go/bin:\$PATH\"\n" | tee -a /home/vagrant/.profile
Expand Down
2 changes: 2 additions & 0 deletions scripts/features/mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ cat > /etc/mysql/mariadb.conf.d/50-server.cnf << EOF
[mysqld]
bind-address = 0.0.0.0
ignore-db-dir = lost+found
#general_log
#general_log_file=/var/log/mysql/mariadb.log
EOF

export MYSQL_PWD=secret
Expand Down
47 changes: 47 additions & 0 deletions scripts/features/meilisearch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

if [ -f ~/.homestead-features/wsl_user_name ]; then
WSL_USER_NAME="$(cat ~/.homestead-features/wsl_user_name)"
WSL_USER_GROUP="$(cat ~/.homestead-features/wsl_user_group)"
else
WSL_USER_NAME=vagrant
WSL_USER_GROUP=vagrant
fi

export DEBIAN_FRONTEND=noninteractive

if [ -f /home/$WSL_USER_NAME/.homestead-features/meilisearch ]
then
echo "meilisearch already installed."
exit 0
fi

touch /home/$WSL_USER_NAME/.homestead-features/meilisearch
chown -Rf $WSL_USER_NAME:$WSL_USER_GROUP /home/$WSL_USER_NAME/.homestead-features

# add the sources for meilisearch
echo "deb [trusted=yes] https://apt.fury.io/meilisearch/ /" > /etc/apt/sources.list.d/fury.list

# update apt and install meilisearch
apt-get update && apt-get install meilisearch-http

# Create a service file
cat > /etc/systemd/system/meilisearch.service << EOF
[Unit]
Description=MeiliSearch
After=systemd-user-sessions.service
[Service]
Type=simple
ExecStart=meilisearch
[Install]
WantedBy=default.target
EOF

# Set the service meilisearch
systemctl daemon-reload
systemctl enable meilisearch

# Start the meilisearch service
systemctl start meilisearch
81 changes: 81 additions & 0 deletions scripts/features/trader.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env bash

if [ -f ~/.homestead-features/wsl_user_name ]; then
WSL_USER_NAME="$(cat ~/.homestead-features/wsl_user_name)"
WSL_USER_GROUP="$(cat ~/.homestead-features/wsl_user_group)"
else
WSL_USER_NAME=vagrant
WSL_USER_GROUP=vagrant
fi

export DEBIAN_FRONTEND=noninteractive

if [ -f /home/$WSL_USER_NAME/.homestead-features/trader ]
then
echo "Trader PHP extension already installed."
exit 0
fi

touch /home/$WSL_USER_NAME/.homestead-features/trader

# Update PECL Channel
sudo pecl channel-update pecl.php.net

# Install Trader Extension
sudo pecl install trader

sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20131226/trader.so
sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20151012/trader.so
sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20160303/trader.so
sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20170718/trader.so
sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20180731/trader.so
sudo cp /usr/lib/php/20190902/trader.so /usr/lib/php/20200930/trader.so

sudo touch /etc/php/8.0/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/8.0/mods-available/trader.ini'
sudo ln -s /etc/php/8.0/mods-available/trader.ini /etc/php/8.0/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/8.0/mods-available/trader.ini /etc/php/8.0/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/8.0/mods-available/trader.ini /etc/php/8.0/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/8.0/mods-available/trader.ini /etc/php/8.0/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/7.4/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/7.4/mods-available/trader.ini'
sudo ln -s /etc/php/7.4/mods-available/trader.ini /etc/php/7.4/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/7.4/mods-available/trader.ini /etc/php/7.4/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/7.4/mods-available/trader.ini /etc/php/7.4/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/7.4/mods-available/trader.ini /etc/php/7.4/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/7.3/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/7.3/mods-available/trader.ini'
sudo ln -s /etc/php/7.3/mods-available/trader.ini /etc/php/7.3/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/7.3/mods-available/trader.ini /etc/php/7.3/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/7.3/mods-available/trader.ini /etc/php/7.3/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/7.3/mods-available/trader.ini /etc/php/7.3/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/7.2/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/7.2/mods-available/trader.ini'
sudo ln -s /etc/php/7.2/mods-available/trader.ini /etc/php/7.2/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/7.2/mods-available/trader.ini /etc/php/7.2/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/7.2/mods-available/trader.ini /etc/php/7.2/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/7.2/mods-available/trader.ini /etc/php/7.2/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/7.1/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/7.1/mods-available/trader.ini'
sudo ln -s /etc/php/7.1/mods-available/trader.ini /etc/php/7.1/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/7.1/mods-available/trader.ini /etc/php/7.1/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/7.1/mods-available/trader.ini /etc/php/7.1/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/7.1/mods-available/trader.ini /etc/php/7.1/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/7.0/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/7.0/mods-available/trader.ini'
sudo ln -s /etc/php/7.0/mods-available/trader.ini /etc/php/7.0/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/7.0/mods-available/trader.ini /etc/php/7.0/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/7.0/mods-available/trader.ini /etc/php/7.0/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/7.0/mods-available/trader.ini /etc/php/7.0/phpdbg/conf.d/20-trader.ini

sudo touch /etc/php/5.6/mods-available/trader.ini
sudo bash -c 'echo "extension=trader.so" >> /etc/php/5.6/mods-available/trader.ini'
sudo ln -s /etc/php/5.6/mods-available/trader.ini /etc/php/5.6/fpm/conf.d/20-trader.ini
sudo ln -s /etc/php/5.6/mods-available/trader.ini /etc/php/5.6/cgi/conf.d/20-trader.ini
sudo ln -s /etc/php/5.6/mods-available/trader.ini /etc/php/5.6/cli/conf.d/20-trader.ini
sudo ln -s /etc/php/5.6/mods-available/trader.ini /etc/php/5.6/phpdbg/conf.d/20-trader.ini
2 changes: 1 addition & 1 deletion scripts/site-types/cakephp3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ server {
index index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
location / {
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/elgg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ block="server {
application/vnd.ms-fontobject
image/svg+xml;
client_max_body_size 100M;
$rewritesTXT
location ~ /.well-known {
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/frontcontroller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ block="server {
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
location / {
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/magento.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ block="server {
index index.php;
autoindex off;
charset utf-8;
client_max_body_size 100M;
error_page 404 403 = /errors/404.php;
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/modx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
3 changes: 1 addition & 2 deletions scripts/site-types/phalcon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ block="server {
index index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down Expand Up @@ -73,8 +74,6 @@ block="server {
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php$5-fpm.sock;
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/pimcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ server {
server_name $1;
root \"$2\";
client_max_body_size 100M;
index index.php;
access_log off;
Expand Down
18 changes: 17 additions & 1 deletion scripts/site-types/proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ if [ -n "$9" ]; then
done
fi

if [ -n "$2" ]
then
if ! [[ "$2" =~ ^[0-9]+$ ]]
then
proxyPass="
proxy_pass ${2};
"
else proxyPass="
proxy_pass http://127.0.0.1:$2;
"
fi
else proxyPass="
proxy_pass http://127.0.0.1;
"
fi

block="server {
listen ${3:-80};
listen ${4:-443} ssl;
Expand All @@ -31,7 +47,7 @@ block="server {
proxy_set_header Connection "upgrade";
proxy_set_header Host \$host;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:${2};
$proxyPass
$headersTXT
$paramsTXT
}
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/silverstripe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ block="server {
root \"$2\";
charset utf-8;
client_max_body_size 100M;
if (\$http_x_forwarded_host) {
return 400;
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/spa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ block="server {
index index.html;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/statamic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
2 changes: 1 addition & 1 deletion scripts/site-types/symfony2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ block="server {
index index.html index.htm index.php app_dev.php;
charset utf-8;
client_max_body_size 20M;
client_max_body_size 100M;
$rewritesTXT
Expand Down
2 changes: 1 addition & 1 deletion scripts/site-types/symfony4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 20M;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/thinkphp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/umi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ block="server {
index index.php index.html index.htm;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/yii.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ block="server {
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 100M;
$rewritesTXT
Expand Down
1 change: 1 addition & 0 deletions scripts/site-types/zf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ block="server {
root \"$2\";
charset utf-8;
client_max_body_size 100M;
index index.php index.html;
Expand Down

0 comments on commit 333ebe7

Please sign in to comment.