cakePhp3
1.0.0
Instale o Docker
Clonar repositório docker:
$ 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
De volta ao “docker-php-nginx”
Agora configure o 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
Feito! agora você pode criar seus produtos
Acesso: http://cake.localhost ao CakePhp Root (Documentação)
Acesse: http://cake.localhost/products para exemplo CRUD