### Parkspace Galaxy

#### Installation
Please check the official laravel installation guide for server requirements before you start. [Official Documentation](https://laravel.com/docs/5.4/installation#installation)

Clone the repository
```sh
git clone git@github.com:aidanraskil/galaxy.git
```
<br>

Switch to the repo folder
```sh
cd galaxy
```
<br>

Install all the dependencies using composer
```sh
composer install
```
<br>

Copy the example env file and make the required configuration changes in the .env file
```sh
cp .env.example .env
```
<br>

Generate a new application key
```sh
php artisan key:generate
```
<br>

Run the database migrations (**Set the database connection in .env before migrating**)
```sh
php artisan migrate 
```
<br>

Start the local development server
```sh
php artisan serve 
```

<br/>

## DEPLOYMENT

### STAGING
```bash
cd /var/www/html/parkspace
git pull
composer install
```

### PRODUCTION
```bash
cd /var/www/html/parkspace
git pull
composer install --no-dev --optimize-autoloader
composer clear-all && composer cache-all
```

#### PS
Add sql files into /database/sql folder

# Queue
Supervisor setting: `/etc/supervisor/*.conf`

# Redis
If you have Redis installed, enable on `.env`:

```
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
```
