Skip to content

Commit

Permalink
Merge pull request #138 from phpsrbija/clean-readme
Browse files Browse the repository at this point in the history
Clean readme file
  • Loading branch information
tasmaniski committed Jul 6, 2017
2 parents ed14478 + d704874 commit 1a0fcda
Showing 1 changed file with 2 additions and 73 deletions.
75 changes: 2 additions & 73 deletions README.md
Expand Up @@ -63,80 +63,9 @@ Such a way will lead us to easier:
- [ ] Move all packages in separate repository (main repo need to have install process)
- [ ] Scale images during upload process; change upload lib.
- [ ] Better naming of variables/functions & write the documentation
- [ ] Devops things as well as rise up code coverage with Unit testing
- [ ] DevOps things as well as rise up code coverage with Unit testing
- [ ] Better handling exceptions per package

## Local development setup

The local development is meant to be used in a vagrant provisioned box.

The provisioner for the project is ansible.

Once you have the prerequisites setup, you can run the
```
vagrant up
```
from you terminal to start the process up.

If you do not see an error message, go get yourself a cup of coffee or your favorite beverage,
you deserve it.

If you start seeing the connection timeout after adding of the private key
```
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
```
You should open up the Virtualbox, click the vm running (name should be along the lines of unfinished....)
and reset it (on OSX it is cmd+t). This is due to some weird bug somewhere on intersection of vagrant, virtualbox and
this ubuntu cloud image.
After the initial virtual machine build, you will not need to use this.

## SSH into the Vagrant box

If you are not already in vagrant, ssh into the Vagrant box by running from you terminal
```bash
vagrant ssh
```

Once you are in Vagrant box shell, change to the project root directory by running from you terminal
```bash
cd /var/www/unfinished
```

## Xdebug

When you need to debug something, and var_dump just does not cut it (and it never should),
you can use XDebug remote debugging abilities to step debug through the problem.
Xdebug has been installed, and has been configured for remote debugging.

Your debugger should listen for ide key: **vagrant-xdebug**

For PHPStorm setup follow the [PHP Remote Debug][phpstorm-remote-debug] instructions, and set the ide key to ``vagrant-xdebug``.

If you prefer standalone debuggers take a look at awesome [pugdebug] by [Robert Basic][robertbasic]

## Database info

You have a local mysql database setup, the db name is `unfinished`, the user is `dev` the password is `dev`.

## Mailhog

For convenience [Mailhog][mailhog] has been setup, so any and all email should be send to the local mailhog
server during development.
To send emails to mailhog, use `127.0.0.1` as smtp/mailer host, and use port 1025 in your config

When you need to access the mailhog web ui, you need to open url `http://192.168.33.11:8025` in your browser

## Redis

For convenience, [Redis][redis] has also been setup, you can access it from you vagrant box by executing `redis-cli`

[Vagrant]: http://www.vagrantup.com/downloads.html
[Ansible]: http://docs.ansible.com/intro_installation.html
[phpstorm-remote-debug]: https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+Web+Applications+with+Run+Debug+Configurations
[pugdebug]: https://github.com/robertbasic/pugdebug
[robertbasic]: http://twitter.com/robertbasic
[mailhog]: https://github.com/mailhog/MailHog
[redis]: https://redis.io
You have a mysql database setup, the db name is `unfinished`, the user is `root` the password is `12345`.

0 comments on commit 1a0fcda

Please sign in to comment.