cakePhp3
1.0.0
도커 설치
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
"docker-php-nginx"로 돌아갑니다.
이제 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
완료! 이제 당신은 당신의 제품을 만들 수 있습니다
액세스: CakePhp 루트에 대한 http://cake.localhost(문서)
액세스: CRUD 예제에 대한 http://cake.localhost/products