Docker environment required to run Laravel (based on official php and mysql docker hub repositories).
- Docker version 18.06 or later
- Docker compose version 1.22 or later
- An editor or IDE
- MySQL Workbench Note: OS recommendation - Linux Ubuntu based.
- Apache 2.4
- PHP 7.2 (Apache handler)
- MySQL 8
- Laravel 5.7
- Build and start the image from your terminal:
docker-compose build make start make composer-install
- Add domain to local 'hosts' file:
127.0.0.1 localhost
- Set key for application:
make ssh php artisan key:generate
- Make sure that you have installed migrations/seeds:
make migrate make seed
- Configure Xdebug:
- In case you need debug only requests from frontend in Firefox:
- Edit /docker/development/xdebug.ini:
xdebug.remote_autostart = 0
- Restart container
- Install locally in Firefox extension "Xdebug helper" and set in settings IDE KEY: PHPSTORM
- Have fun with debugging
- In case you need debug any request to an api:
- Edit /docker/development/xdebug.ini:
xdebug.remote_autostart = 1
- Restart container
- Have fun with debugging
- In case you need debug only requests from frontend in Firefox:
```
make start
make stop
make restart
make ssh
make ssh-supervisord
make composer-install
make composer-update
make info
make drop-migrate
make migrate
make seed
make phpunit
etc....
```
Notes: Please see more commands in Makefile
- Laravel 5.7
- laravel-migrations-organiser
- phpunit
- phpunit-result-printer
- laravel-ide-helper
- scriptsdev
- For new feature development, fork
develop
branch into a new branch with one of the two patterns:feature/{ticketNo}
- Commit often, and write descriptive commit messages, so its easier to follow steps taken when reviewing.
- Push this branch to the repo and create pull request into
develop
to get feedback, with the formatfeature/{ticketNo}
- Short descriptive title of Jira task". - Iterate as needed.
- Make sure that "All checks have passed" on circleci and status is green.
- When PR is approved, it will be squashed & merged, into
develop
and later merged intorelease/{No}
for deployment.