This application is defined with Docker Compose V1. Docker Compose is included in Docker Desktop.
Docker Compose for development environment exposes following ports:
- 80 (HTTP) http://localhost/
- 3306 (MySQL) username and password are set in docker-compose.yml
If another application is using these ports, Docker Compose can't start. Please stop that application before starting Docker Compose.
Docker Compose has php-app
service.
Use it to run Composer or CakePHP commands.
Commands in Docker Compose run at app directory.
For example, run following command after docker-compose up
to install dependencies:
docker-compose exec php-app composer install
The Docker Compose for php-app
service had been configured with debugging engine Xdebug.
Please configure the IDE with debugging support for Xdebug.
To ensure the written code following the basic coding standard & quality, we've configured the Docker Compose for php-app
service with tools:
- PHP Code Sniffer (PHPCS) based on CakePHP coding standard rules.
- PHPStan - PHP Static Analysis Tool.
Everytime making a changes to the code, please run both commands as follows:
docker-compose exec php-app composer cs-check
docker-compose exec php-app composer stan
If either both tools complaint about errors, then please fix following the basic coding standard & quality.
We'll practice the web development using CakePHP Framework following https://book.cakephp.org/4/en/tutorials-and-examples.html
- Please fork this repository.
- Please create 1 PR for each topic. For example:
PR # | Branch name | Based branch | PR Title | Memo |
---|---|---|---|---|
1 | cakephp-tutorial-database | main | Creating the Database | Reference CMS Tutorial - Creating the Database - Once created the tables, please refer CakePHP Migration. Please do create initial migration from the existing database. |
2 | cakephp-tutorial-articles | cakephp-tutorial-database | Creating the Articles Controller | Reference CMS Tutorial - Creating the Articles Controller. |
3 | cakephp-tutorial-tags-and-users | cakephp-tutorial-articles | Tags and Users | Reference CMS Tutorial - Tags and Users |
4 | cakephp-tutorial-authentication | cakephp-tutorial-tags-and-users | Authentication | Reference CMS Tutorial - Authentication |
5 | cakephp-tutorial-authorization | cakephp-tutorial-authentication | Authorization | Reference CMS Tutorial - Authorization |
- Please kindly share the URL of the Pull Request once finish the development.
- Important Note: Please make a small & meaningful commits.