CakePHP CMS Tutorial with RDB Replication Considerations
An implementation of CakePHP CMS Tutorial which comes :
- with RDB replication considerations
- models connect to the master database by default, and to replicas if specified to do so.
- with Docker settings for local development environment
- without the authentication part
Requirements
- Docker Compose
- Internet connection during setup
- The following TCP ports are available on your machine. If you want to change this, just modify
ports
left value in docker-compose.yml- 8080 : The CMS app listens here
- 8081 : phpMyAdmin listens here
- 3306 : MySQL listens here
Installation
- Clone this repository
- Open a terminal and move to the cloned directory, where you can see
docker-compose.yml
or some other files. - Execute the following commands
docker-compose build
docker-compose up -d
docker-compose exec web "/composer_install.sh"
Note : If you have some troubles on docker-compose build
, try docker-compose build --no-cache
instead.
Local Development Environment
- Commands : can be executed in the repository root directory
docker-compose start
: start the container workingdocker-compose stop
: stop the container workingdocker-compose down
: destroy the containers. You will need Installation steps described above to reenable the environment after destroying.docker-compose exec web bash
: destroy the containers
- URLs
- http://localhost:8080/ : the app default page to confirm environments and so on
- http://localhost:8080/tags : Tag list of the CMS app
- http://localhost:8080/articles : Article list of the CMS app
- http://localhost:8081/db_structure.php?server=1&db=cake_cms : phpMyAdmin
License
Please note that this repository depends on and contains the following works, under their licenses.
- CakePHP Application Skeleton
- MIT License
- CakePHP CMS Tutorial
- license (CC BY-NC-SA 4.0)
Version Information
- CakePHP : 3.8
- Ubuntu Docker Image : 18.04 (bionic)
- PHP 7.2
- MySQL Docker Image : 8.0
- phpMyAdmin Docker Image : 4.9