phpvms/README.md

92 lines
2.9 KiB
Markdown
Raw Normal View History

2017-06-10 10:28:13 +08:00
![](http://i.imgur.com/bMh1xn6.png)
2017-06-09 02:28:26 +08:00
2017-06-10 10:28:13 +08:00
# phpvms <sup>4</sup>
2017-06-09 02:28:26 +08:00
2017-06-12 01:44:24 +08:00
[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/nabeelio/phpvms_next) [![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
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
run the following commands. for right now, we're running on sqlite. for mysql, set `DB_CONNECTION` to `mysql` in the `.env` file, and skip the `sqlite3` step below.
2017-06-11 21:17:41 +08:00
```bash
2017-06-11 21:15:15 +08:00
cp .env.example .env
composer install --no-interaction
php artisan optimize
2017-06-11 21:15:15 +08:00
sqlite3 database/testing.sqlite ""
php artisan migrate:refresh --seed
```
then point your webserver to the `/public` folder. for example, in 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;
}
}
```
2017-06-14 01:50:03 +08:00
## development environment
2017-06-12 00:47:21 +08:00
2017-06-14 01:50:03 +08:00
For development, copy the included `.env.example` to `.env` file. By default, it uses sqlite
instead of mysql. This makes it much easier to be able to clear the database and new fixtures.
2017-06-12 00:47:21 +08:00
2017-06-14 01:50:03 +08:00
### makefile commands
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
```
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`.
### virtual machine
Using [Laravel Homestead](https://laravel.com/docs/5.4/homestead) is probably the easiest
way to get this working. 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.
2017-06-11 21:15:15 +08:00
(TODO: redis information, etc)
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
```