Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Commit

Permalink
Updated from upstream (#11)
Browse files Browse the repository at this point in the history
* add Symfony4 nginx configuration (laravel#600)

* add Symfony4 nginx configuration

* add aliases for symfony4

* ✨ 💡 Make sure not use the `Code` subfolder in vagrant, should use top level (laravel#601)

There is no reason to add another folder inside vagrant that we map our projects to. This change will elimnate sites being placed in `/home/vagrant/Code/` and place them in `/home/vagrant/`

* The safer, the better (laravel#613)

Any link that can be HTTPS, should be HTTPS 🔐

* Add nginx config for Elgg sites (laravel#616)

Adds template shell config to easily bootstrap Elgg sites on Homestead.

Fixes laravel#615

* ✨ ❄️ 💡 Add support for multiple versions of PHP (laravel#621)

* 💎 🔖 Tagging v6.0.0

* 🚑 🚀 When configuring apache always ensure mod_rewrite is enabled (laravel#622)

* 💎 🔖 Tagging 6.0.1

* 🚑 Fixing site params not being read correctly from serve scripts (laravel#626)

While debugging laravel#625 I noticed params weren't being set correctly because we added the php version to the site params bumping the params to $6 instead of $5

* ❄️ 🚑 ✅ Make command should respect Homestead config example file (laravel#624)

* ❄️ 🚑 ✅ Make command should respect Homestead config example file

The make command should now correctly copy over all site options and folder options from an existing example file.

* Apply fixes from StyleCI (laravel#623)

* Contributions to laravel#624 (laravel#627)

* Restore docblocks formatting

This allows to maintain consistency with the docblocks style from the
repositories laravel/laravel and laravel/framework.

* Add more tests for shared folders configuration

* 💎 🔖 Tagging 6.0.2

* 🚑 Disable apparmor when installing mariadb so it won't cause issues w/ restart (laravel#636)

* 💎 🔖 Tagging 6.0.3

* allow serve functions to specify a php version (laravel#631)

a little bug introduced by the recent ability to specify PHP verions.

the `serve` functions are currently failing because they do not specify a PHP version, and there is no default.

this PR allows the `serve` functions to specify a specific PHP version (5.6, 7.0, or 7.1 currently) or omit it and be given a default.

2 thoughts for the future:

-not sure if there's a better place to define the default so we're not hardcoding it in everywhere here.
- probably should write a test to avoid this regression again.

* Add support for Pimcore (laravel#634)

* Add support for Pimcore 5 served by Apache

* Rename pimcore5 type to pimcore

* PHP version aware for prod env (laravel#639)

* ❄️ 🚑 🐧 Fix bad site root path generation by make command (laravel#646)

Resloves laravel#645

* 💎 🔖 Tagging 6.1.0

* Add aliases for easy switching between PHP versions (laravel#647)

* Add aliases for easy switching between PHP versions

* Change order of aliases

* Use function instead of alias to swith php version (laravel#648)

Remove the alias, since there is already a function to switch php
version

* allow pimcore serve function to specify a php version (laravel#649)

* Safety first! (laravel#655)

* Edit some grammar and include some links (laravel#654)

This is to add some helpful links along with a few grammar and textual tweaks.

* Upgrade MariaDB version from 10.1 to 10.2 (stable) (laravel#657)

Note: This commit differs slightly from the initial attempt at https://github.com/laravel/homestead/pull/441/files in that this commit addresses the erroneous `default_password_lifetime` directive, too.

For the reasons described from laravel#529 (comment) to the end of the thread, it seems appropriate to re-introduce Maria DB 10.2.x, now that the 10.2 series is marked GA/stable, per https://mariadb.com/kb/en/the-mariadb-library/changes-improvements-in-mariadb-102/ .

Also, according to https://mariadb.com/kb/en/the-mariadb-library/system-variable-differences-between-mariadb-101-and-mysql-57/ , the `default_password_lifetime` is a `MySQL-only variable determining how long passwords are valid for before expiring.`

With this directive present, Homestead (v6.1.0) provisioning fails with:

    ==> homestead-7: mysql: unknown variable 'default_password_lifetime=0'

Removing this directive resolves the problem.

* Overhaul and update MongoDB installation script (laravel#662)

* Overhaul and update MongoDB installation script

The impetus for this rewrite is that from the initial commit, every php-cli invocation caused PHP to emit a warning. This can be tested/verified as follows:

    vagrant@homestead:~$ php -r 'echo "test\n";'
    PHP Warning:  Module 'mongodb' already loaded in Unknown on line 0
    test

The root-cause turned out to be that the PECL installer was adding `extension = mongodb.so` to the very top of `/etc/php/7.1/cli/php.ini` (along with entries for several other extensions, which in itself seems like a bug with the PECL installer).

Once I dug into the source, it became clear that the MongoDB driver was being installed only for PHP 7.1, and none of the other (earlier) PHP versions for which support was added recently. The only means by which to install the driver for all PHP versions is to build it from source for each version. This change addresses that need.

In any case, the nature of the proposed changes is as follows:

1. Upgrade MongoDB version from 3.2 to 3.4, and remove `--allow-unauthenticated` switch from `apt-get install` command (there should be no reason to use this switch).

2. Remove sed command that seems designed to modify /usr/bin/pecl directly, which seems like a "bad idea". Also, as of this writing, `/usr/bin/pecl` is untouched after the command is executed, so perhaps the bug it was designed to address has been fixed upstream.

3. Remove duplicate package names when installing packages required to build MongoDB PECL extension and consolidate into a single `apt-get` command.

4. Remove inline systemd init script for MongoDB, as the official package installs its own, and rename references to match common convention (convention is `mongod`, as in "Mongo Daemon", instead of `mongodb`). Also, remove needless call to `systemctl status mongodb`, as it produces "noise", and fix the order in which systemd calls are executed post-installation.

5. Build and enable mongodb PECL extension for all versions of PHP (not just 7.1). Previously, the extension was built and enabled only for PHP 7.1.

6. Remove needless call to restart nginx, as nginx is uninvolved with this process.

* Delete comments left accidentally

Neglected to remove those commented lines; they are now unnecessary.

* 🔖 Tagging 6.2.0

* Fixes for MongoDB installation bugs on v6.2.0. (laravel#666)

* Create missing mods-available file.

This was symlinked from a few places, but the file did not actually exist here.

* Link mongo extension for CLI.

* 💎 🔖 Tagging 6.2.2

* lowercase 'code' directory (laravel#667)

not sure why this was done originally, but it's an unecessary extra keystroke

* Remove code directory (laravel#672)

This will allow to share everything inside the ~/code from the host OS
directly into the vagrant shared directory (/home/vagrant).

This complements the work in the PR laravel#601

* ❄️ Use .localhost as default TLD (laravel#674)

* Revert "Remove code directory" (laravel#675)

* Revert "❄️ Use .localhost as default TLD (laravel#674)"

This reverts commit 9f4ad5e.

* Revert "Remove code directory (laravel#672)"

This reverts commit 03d8192.

* Turn on HTTPS for Apache (laravel#678)

Seems like a lot of work went into getting HTTPS support for Apache. But it's not turned on by default.

So, turn it on.
  • Loading branch information
keanolane committed Oct 31, 2017
1 parent 3d42018 commit b073c7b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ Official documentation [is located here](https://laravel.com/docs/homestead).
* [Troubleshooting](./docs/Troubleshooting.md)

***

# Learn more about Homestead
Find out more about the Official Homestead (from which our stack inherit)

Official documentation [is located here](https://laravel.com/docs/homestead).
39 changes: 39 additions & 0 deletions scripts/install-mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,45 @@ sudo apt-get update

sudo DEBIAN_FRONTEND=noninteractive apt-get -yq -o Dpkg::Options::="--force-confnew" install mongodb-org autoconf g++ make openssl libssl-dev libcurl4-openssl-dev pkg-config libsasl2-dev php-dev

sudo rm -rf /tmp/mongo-php-driver /usr/src/mongo-php-driver
git clone -c advice.detachedHead=false -q -b '1.2.9' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver
sudo mv /tmp/mongo-php-driver /usr/src/mongo-php-driver
cd /usr/src/mongo-php-driver
git submodule -q update --init

phpize5.6
./configure --with-php-config=/usr/bin/php-config5.6 > /dev/null
make clean > /dev/null
make >/dev/null 2>&1
sudo make install
sudo chmod 644 /usr/lib/php/20131226/mongodb.so
sudo bash -c "echo 'extension=mongodb.so' > /etc/php/5.6/mods-available/mongo.ini"
sudo ln -s /etc/php/5.6/mods-available/mongo.ini /etc/php/5.6/cli/conf.d/20-mongo.ini
sudo ln -s /etc/php/5.6/mods-available/mongo.ini /etc/php/5.6/fpm/conf.d/20-mongo.ini
sudo service php5.6-fpm restart

phpize7.0
./configure --with-php-config=/usr/bin/php-config7.0 > /dev/null
make clean > /dev/null
make >/dev/null 2>&1
sudo make install
sudo chmod 644 /usr/lib/php/20151012/mongodb.so
sudo bash -c "echo 'extension=mongodb.so' > /etc/php/7.0/mods-available/mongo.ini"
sudo ln -s /etc/php/7.0/mods-available/mongo.ini /etc/php/7.0/cli/conf.d/20-mongo.ini
sudo ln -s /etc/php/7.0/mods-available/mongo.ini /etc/php/7.0/fpm/conf.d/20-mongo.ini
sudo service php7.0-fpm restart

phpize7.1
./configure --with-php-config=/usr/bin/php-config7.1 > /dev/null
make clean > /dev/null
make >/dev/null 2>&1
sudo make install
sudo chmod 644 /usr/lib/php/20160303/mongodb.so
sudo bash -c "echo 'extension=mongodb.so' > /etc/php/7.1/mods-available/mongo.ini"
sudo ln -s /etc/php/7.1/mods-available/mongo.ini /etc/php/7.1/cli/conf.d/20-mongo.ini
sudo ln -s /etc/php/7.1/mods-available/mongo.ini /etc/php/7.1/fpm/conf.d/20-mongo.ini
sudo service php7.1-fpm restart

sudo ufw allow 27017
sudo sed -i "s/bindIp: .*/bindIp: 0.0.0.0/" /etc/mongod.conf

Expand Down

0 comments on commit b073c7b

Please sign in to comment.