You should have Composer installed and available. If you need to install composer, go to their Getting Started docs. If you will be using Vagrant for local development, you'll need to have it installed as well.
-
Clone this repo.
-
Go into the folder, and run
vagrant upto start the VM. -
Add the following entry to your hosts file:
192.168.56.101 www.mentoring.dev mentoring.dev
-
Run
vagrant sshto go into the VM. -
CD to
/var/wwwand runcomposer install -
From the same directory, run
vendor/bin/phinx initto generate aphinx.ymlfile. -
If you get an error like the following:
Could not fetch https://api.github.com/repos/vlucas/phpdotenv/zipball/732d2adb7d916c9593b9d58c3b0d9ebefead07aa, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+packer-virtualbox-iso-1422588891+2015-05-22+0002 to retrieve a token. It will be stored in "/home/vagrant/.composer/auth.json" for future use by Composer.
You will need to navigate to the URL in a browser, authenticate with GitHub, and generate the access token.
- Edit
phinx.yml's development section with the following values for MySQL credentials:
- name: mentoring
- user: mentoring
- pass: vagrant
-
Edit
phinx.yml'spaths.migrationsvalue to:%%PHINX_CONFIG_DIR%%/data/migrations
-
Run
vendor/bin/phinx migrateto run the database migrations. -
Copy
.env.exampleto.env -
Create a new Github Application at https://github.com/settings/applications/new
- Set the Homepage and Authorization callback URL to http://mentoring.dev
-
Update lines 7 and 8 for
GITHUB_API_KEYandGITHUB_API_SECRETin your.envfile with the Client ID and Client Secret for your app. -
Visit http://mentoring.dev in your browser!
If you want to help out and cannot download or run Vagrant, you can run the application locally using PHP's built in dev server. You will need the following packages:
- php-curl
- php-intl
-
Clone this repo.
-
Add the following entry to your hosts file. On unix-like systems, its usually found at
/etc/hosts:127.0.0.1 www.mentoring.dev mentoring.dev
-
CD to the directory where you cloned the project in step 1 and run
composer install -
From the same directory, run
vendor/bin/phinx initto generate aphinx.ymlfile. -
Edit
phinx.yml's development section (lines 19-21) with the following values for MySQL.
- name: mentoring
- user: mentoring
- pass: vagrant
To use sqlite, in phinx.yml change change the adapter to sqlite (line 17) the name (line 19) to data/mentoring.db. In .env change DB_DRIVER to pdo_sqlite on line 1.
-
Edit
phinx.yml'spaths.migrationsvalue (line 2) to:%%PHINX_CONFIG_DIR%%/data/migrations
-
Run
vendor/bin/phinx migrateto run the database migrations. -
Copy
.env.exampleto.env -
Create a new Github Application at https://github.com/settings/applications/new
- Set the Homepage and Authorization callback URL to http://mentoring.dev:8080
-
Update lines 7 and 8 for
GITHUB_API_KEYandGITHUB_API_SECRETin your.envfile with the Client ID and Client Secret for your app. 11 To run using PHP's built-in server, navigate to the root of the project and run:php -S mentoring.dev:8080 -t public public/index.php
-
Visit http://mentoring.dev:8080 in your browser!