phpvms/README.md

85 lines
3.3 KiB
Markdown
Raw Normal View History

2017-12-03 00:33:10 +08:00
# phpvms <sup>7</sup>
2017-06-09 02:28:26 +08:00
2017-07-12 06:51:12 +08:00
[![Build Status](https://travis-ci.org/nabeelio/phpvms.svg)](https://travis-ci.org/nabeelio/phpvms) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d668bebb0a3c46bda381af16ce3d9450)](https://www.codacy.com/app/nabeelio/phpvms?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nabeelio/phpvms&amp;utm_campaign=Badge_Grade) [![Total Downloads](https://poser.pugx.org/nabeel/phpvms/downloads)](https://packagist.org/packages/nabeel/phpvms) [![Latest Stable Version](https://poser.pugx.org/nabeel/phpvms/v/stable)](https://packagist.org/packages/nabeel/phpvms) [![Latest Unstable Version](https://poser.pugx.org/nabeel/phpvms/v/unstable)](https://packagist.org/packages/nabeel/phpvms) [![License](https://poser.pugx.org/nabeel/phpvms/license)](https://packagist.org/packages/nabeel/phpvms)
2017-06-09 02:28:26 +08:00
2017-06-22 01:29:31 +08:00
The next phpvms version built on the laravel framework. work in progress. If you're looking for
the old, phpVMS classic, it's [available here](https://github.com/nabeelio/phpvms_v2).
2017-06-09 02:28:26 +08:00
2017-06-11 21:15:15 +08:00
# installation
2017-12-18 01:50:44 +08:00
A full distribution, with all of the composer dependencies, is available at this
2018-01-23 11:11:58 +08:00
[tarball link](http://downloads.phpvms.net/phpvms-7.0.0-master.tar.gz). It's currently
2017-12-18 01:50:44 +08:00
updated with every commit
2017-12-14 10:22:54 +08:00
2017-12-18 01:50:44 +08:00
### Composer Access
2017-12-14 10:22:54 +08:00
2017-06-22 01:29:31 +08:00
run the following commands. for right now, we're running on sqlite. for mysql, set
2017-12-18 01:50:44 +08:00
`DB_CONNECTION` to `mysql` in the `env.php` file.
2017-06-11 21:15:15 +08:00
2017-06-11 21:17:41 +08:00
```bash
2017-12-18 01:50:44 +08:00
cp env.php.example env.php
2017-06-11 21:15:15 +08:00
composer install --no-interaction
php artisan database:create
2017-06-11 21:15:15 +08:00
php artisan migrate:refresh --seed
```
2017-12-18 01:50:44 +08:00
then point your webserver to the `/public` folder.
2017-06-11 21:15:15 +08:00
By default, the Makefile calls the system-wide `composer`. If your host requires a
certain path or name for composer, add `COMPOSER=` to the front of the `make` command, e.g:
```bash
COMPOSER=composer.phar make install
```
2017-06-14 01:50:03 +08:00
## development environment
2017-06-12 00:47:21 +08:00
2017-12-18 01:50:44 +08:00
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.
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:
2017-06-12 00:47:21 +08:00
```bash
2017-12-18 01:50:44 +08:00
cp env.php.example env.php
php artisan key:generate
make install # this will install everything
valet link phpvms
```
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
2017-12-18 01:50:44 +08:00
`env.php` file to point to the mysql.
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)
### creating/resetting the environment
2017-06-14 01:50:03 +08:00
I use Makefiles to be able to quickly setup the environment.
```bash
# to do an initial setup of the composer deps and install the DB
make install
2017-06-14 01:50:03 +08:00
```
Then to reset the database/clear cache, use:
```bash
make reset
```
### database seeding
There is a `database/seeds/dev.yml` which contains the initial seed data that can be used
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`.
2017-06-11 21:17:41 +08:00
# updating
extract files and run the migrations:
2017-06-09 02:28:26 +08:00
2017-06-11 21:17:41 +08:00
```bash
php artisan migrate
```