Skip to content

Commit

Permalink
Add Redis Support (thedevdojo#73)
Browse files Browse the repository at this point in the history
* Install redis

* Fix typo missing then

* Fix typo in README from thedevdojo#72

* Update help menu

* Update README with how to setup redis
  • Loading branch information
SamuelMwangiW authored Sep 7, 2021
1 parent 8b80621 commit 52712fa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .larasail/includes/help
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ echo " ${Yellow}setup php80${Color_Off} Setup a new server with Nginx, P
echo " ${Yellow}setup php73${Color_Off} Setup a new server with Nginx, PHP 7.3, and MySQL 5.7"
echo " ${Yellow}setup php72${Color_Off} Setup a new server with Nginx, PHP 7.2, and MySQL 5.7"
echo " ${Yellow}setup php71${Color_Off} Setup a new server with Nginx, PHP 7.1, and MySQL 5.7"
echo " ${Yellow}setup mariadb${Color_Off} Setup a new server with Nginx, PHP 7.4, and MariaDB 10.3"
echo " ${Yellow}setup redis${Color_Off} Setup a new server with Nginx, PHP 7.4, and MySQL 8 and Redis Server"
echo " ${Yellow}new${Color_Off} Create a new Laravel project using Larasail"
echo " ${Yellow}host${Color_Off} Create a new Nginx host"
echo " ${Yellow}host \$1 \$2${Color_Off} \$1=domain, \$2=folder_location (ex. larasail host url.com /var/www/folder)"
Expand Down
13 changes: 13 additions & 0 deletions .larasail/setup
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
PHP="7.4"
MYSQL_SERVICE="MySQL"
MYSQL_PACKAGE="mysql-server"
INSTALL_REDIS=0

if [ "$2" = "php80" ] || [ "$3" = "php80" ]; then
PHP="8.0"
Expand All @@ -31,6 +32,10 @@ if [ "$2" = "mariadb" ] || [ "$3" = "mariadb" ]; then
MYSQL_PACKAGE="mariadb-server"
fi

if [ "$2" = "redis" ] || [ "$3" = "redis" ]; then
INSTALL_REDIS=1
fi

setsail


Expand Down Expand Up @@ -168,6 +173,14 @@ else
sudo apt-get -y install python-certbot-nginx
fi

if [ $INSTALL_REDIS -eq 1 ] ; then
bar
cyan "| Installing Redis"
bar

sudo apt -y install redis-server
fi

setsail

bar
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ larasail setup mariadb php80 # same as 2 above
```

### Redis
By default, larasail does not install a Redis server. To opt to install `redis`, pass `redis` option to `larasail setup` as the second or third parameter like so:
```shell
larasail setup php80 redis
```

or

```shell
larasail setup redis
```

## Creating a New Site

### :sparkles: Automatically
Expand All @@ -68,15 +80,15 @@ By default, larasail sets up the Nginx site configuration and Letsencrypt SSL ce

#### Wave

(Wave)[https://github.com/thedevdojo/wave] - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams :rocket: :moneybag:
[Wave](https://github.com/thedevdojo/wave) - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams :rocket: :moneybag:
Larasail now allows you to create a new wave project automatically by adding `--wave` flag to the `new` command as follows:

```
larasail new <project-name> [--wave]
```

Just like Laravel above, this will automaically create a project folder, setup the Nginx site configuration and Letsencrypt SSL certificate for your domain.
By default, you will be promted to create a project database and if successful, will migrate and seed the database.
Just like Laravel above, this will automaically create a project folder, setup the Nginx site configuration and Letsencrypt SSL certificate for your domain.
By default, you will be promted to create a project database and if successful, will migrate and seed the database.

### :construction: Manually

Expand Down

0 comments on commit 52712fa

Please sign in to comment.