Updated instructions in README

This commit is contained in:
Nabeel Shahzad 2017-12-17 11:50:44 -06:00
parent 3e1336d9c3
commit 8147d76403

View File

@ -7,49 +7,34 @@ the old, phpVMS classic, it's [available here](https://github.com/nabeelio/phpvm
# installation # installation
A full distribution, with all of the composer dependencies, is available at this [tarball link](http://phpvms.net/downloads/nightly.tar.gz). A full distribution, with all of the composer dependencies, is available at this
It's currently updated with every commit [tarball link](http://phpvms.net/downloads/phpvms-7.0.0-master.tar.gz). It's currently
updated with every commit
## Composer Access ### Composer Access
run the following commands. for right now, we're running on sqlite. for mysql, set run the following commands. for right now, we're running on sqlite. for mysql, set
`DB_CONNECTION` to `mysql` in the `.env` file. `DB_CONNECTION` to `mysql` in the `env.php` file.
```bash ```bash
cp .env.dev.example .env cp env.php.example env.php
composer install --no-interaction composer install --no-interaction
php artisan database:create php artisan database:create
php artisan migrate:refresh --seed php artisan migrate:refresh --seed
``` ```
then point your webserver to the `/public` folder. for example, in nginx: then point your webserver to the `/public` folder.
```nginx
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/laravel/public;
index index.php index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
}
```
## development environment ## development environment
For development, copy the included `.env.dev.example` to `.env` file. By default, it uses sqlite For development, copy the included `env.php.example` to `env.php` file. By default, it uses sqlite
instead of mysql. This makes it much easier to be able to clear the database and new fixtures. instead of mysql. This makes it much easier to be able to clear the database and new fixtures.
The easiest way to load locally is to install [Laravel Valet](https://laravel.com/docs/5.5/valet) The easiest way to load locally is to install [Laravel Valet](https://laravel.com/docs/5.5/valet)
(if you're running a Mac). Once you install it, go to your phpvms directory, and run: (if you're running a Mac). Once you install it, go to your phpvms directory, and run:
```bash ```bash
cp .env.dev.example .env cp env.php.example env.php
php artisan key:generate php artisan key:generate
make install # this will install everything make install # this will install everything
valet link phpvms valet link phpvms
@ -57,7 +42,7 @@ valet link phpvms
Now going to [http://phpvms.dev](http://phpvms.dev) should work. If you want to use mysql, Now going to [http://phpvms.dev](http://phpvms.dev) should work. If you want to use mysql,
follow the valet directions on installing mysql (`brew install mysql`) and then update the follow the valet directions on installing mysql (`brew install mysql`) and then update the
`.env` file to point to the mysql. `env.php` file to point to the mysql.
The default username and password are "admin@phpvms.net" and "admin". The default username and password are "admin@phpvms.net" and "admin".
To see the available users in the development environment, [see this file](https://github.com/nabeelio/phpvms/blob/master/database/seeds/dev.yml#L10) To see the available users in the development environment, [see this file](https://github.com/nabeelio/phpvms/blob/master/database/seeds/dev.yml#L10)
@ -83,27 +68,6 @@ There is a `database/seeds/dev.yml` which contains the initial seed data that ca
for testing. For production use, there is a `prod.yml` file. The `make reset` handles seeding for testing. For production use, there is a `prod.yml` file. The `make reset` handles seeding
the database with the data from the `dev.yml`. the database with the data from the `dev.yml`.
### virtual machine
Using [Laravel Homestead](https://laravel.com/docs/5.4/homestead) is one way to get your dev
environment working if you're on Windows or don't want to install any Homebrew services
on your Mac. Follow their instructions for install. A `Vagrantfile` and `Homestead.yaml`
is included here. Add this to your `/etc/hosts`:
```bash
127.0.0.1 phpvms.app
```
And then to launch:
```bash
vagrant up
```
And then accessing it via `http://phpvms.app` should just work.
(TODO: redis information, etc)
# updating # updating
extract files and run the migrations: extract files and run the migrations:
@ -111,5 +75,3 @@ extract files and run the migrations:
```bash ```bash
php artisan migrate php artisan migrate
``` ```
![](http://i.imgur.com/bMh1xn6.png)