cakePhp3
1.0.0
Install Docker
Clone docker repository:
$ git clone https://github.com/p2sousa/docker-php-nginx.git
$ cd docker-php-nginx
$ cp env.dist .env
$ cd application
$ git clone https://github.com/p2sousa/cakePhp3.git cake
$ cd ..
$ docker-compose build
$ docker-compose up -d
$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------
application /tmp/entrypoint.sh Up 9000/tcp
database docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp, 33060/tcp
nginx nginx Up 443/tcp, 0.0.0.0:80->80/tcp
$ sudo vim /etc/hosts
127.0.0.1 localhost cake.localhost
Back in the "docker-php-nginx”
Now configure cakePhp
$ cd application/cake/config/
$ cp app.default.php app.php
$ docker exec -it application bash
$ composer update
$ bin/cake migrations migrate
$ bin/cake migrations seed
Done! now you can create your products
Access: http://cake.localhost to CakePhp Root (Documentation)
Access: http://cake.localhost/products to CRUD example