I'll be adding Docker compose file to simplify my task here.
After clone, run this commands:
- Docker Compose
docker-compose up
- After Container setup completed. Turn the docker down.
docker-compose down
Using this docker setup, you can either clone a yii2 project into apogee-phpyii2
directory or initialize a new project using composer commands.
If you already have composer in your system, simply run:
composer create-project yiisoft/yii2-app-basic apogee-phpyii2
Or if you don't install it, you may use composer
within the phpweb
container. Make sure you run the container first using docker-compose up -d
Enter the container using this command:
docker exec -it <container name> /bin/bash
Then run the composer command from html directory.
cd /var/www/html
composer create-project yiisoft/yii2-app-basic .