Skip to content

Commit

Permalink
updated install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MelonSmasher committed Jun 9, 2017
1 parent edbad2c commit 05e6847
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 45 deletions.
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
"php artisan key:generate",
"php artisan orm:bckey",
"bash generate_jwt_key.sh"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"composer dump-autoload -o",
"php artisan optimize"

"php artisan optimize",
"php artisan route:cache",
"php artisan api:cache"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
Expand All @@ -82,6 +85,8 @@
]
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
62 changes: 21 additions & 41 deletions docs/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ PHP Packages:

### Install:

* Step 1: [Install NGINX](https://github.com/MelonSmasher/NginxInstaller)
* [Install NGINX](https://github.com/MelonSmasher/NginxInstaller)

* Step 2: Install MariaDB
* Install MariaDB

* Step 3: Install Redis
* Install Redis

* Step 4: Install PHP and extensions
* Install PHP and extensions

* Step 5: Initialize the DB
* Initialize the DB

```mysql
create database orm;
Expand All @@ -39,57 +39,37 @@ GRANT ALL PRIVILEGES ON orm.* To 'orm'@'localhost';
FLUSH PRIVILEGES;
```

* Step 6: Initialize ORM
* Initialize ORM

```bash
# Create a vendor dir
sudo mkdir /home/nginx; sudo mkdir /usr/share/nginx/html/OpenResourceManager; cd /usr/share/nginx/html/OpenResourceManager;
sudo mkdir /home/nginx;

# Set the right permissions
sudo chown -R nginx:nginx /usr/share/nginx/html/OpenResourceManager; sudo chown -R nginx:nginx /home/nginx;
sudo chown -R nginx:nginx /home/nginx;

# Clone Repo
sudo -u nginx git clone https://github.com/OpenResourceManager/Core.git; cd Core;
# Go to the web root
cd /usr/share/nginx/html/;

# Check out to the latest tag
sudo -u nginx git checkout $(git describe --tags $(git rev-list --tags --max-count=1));
# Clone Repo with composer
sudo -u nginx composer create-project open-resource-manager/core OpenResourceManager/Core dev-master --keep-vcs --no-dev;

# Create a new envorinment file
sudo -u nginx cp .env.example .env;

# Install composer dependancies
sudo -u nginx composer install --no-dev;

# Generate optimaized class loader
sudo -u nginx composer dump-autoload -o;
# Get into the project
cd OpenResourceManager/Core;
```

# Generate a new application key
sudo -u nginx php artisan key:generate;
* Configure environment settings

# Generate a boradcast key
sudo -u nginx php artisan orm:bckey;
```bash
sudo -u nginx vi .env;
```

# Generate a new JWT key
sudo -u nginx bash generate_jwt_key.sh;
* DB Migrations and Seeds

```bash
# Run DB Migrations
sudo -u nginx php artisan migrate --force;

# Seed DB With Default Assets
sudo -u nginx php artisan db:seed --force;

# Compile and optomize
sudo -u nginx php artisan optimize;

# Cache normal routes
sudo -u nginx php artisan route:cache;

# Cache API routes
sudo -u nginx php artisan api:cache;
```

* Step 7: Open the `.env` file in your favorite editor and configure it.

```bash
sudo -u nginx vi .env;
```

0 comments on commit 05e6847

Please sign in to comment.