Yii2 advanced project environment
This repository is made available for people to easily setup dev environments to start playing around with Yii2. By running a Vagrant VM and provisioned with Ansible, it is pretty trivial to get a professional dev environment setup.
You will need Vagrant, Ansible and virtual machine software such as VirtualBox installed. The virtual machine runs Debian 7 with Nginx, MariaDB and PHP5.5.
- Clone repo: git clone firstname.lastname@example.org:doublehops/yii2-advanced-dev-environment.git . (include trailing .)
- Create project's web path: mkdir app
- Type vagrant up to install and startup the virtual machine. This will take some time.
- Type vagrant ssh to ssh into the vm and change to path /var/www. cd /var/www
- Run composer global require "fxp/composer-asset-plugin:1.0.0"
- Run composer create-project --prefer-dist yiisoft/yii2-app-advanirtuced .
- Run php init and select Development.
- Update file common/config/main-local.php with database parameters: database-name=yii2, user=dev and password=secret.
- Run migration script to install user table: yii-application/yii migrate
- Exit back out to your host machine.
- Add domains to your hosts file: echo "192.168.33.13 frontend backend" | sudo tee --append /etc/hosts > /dev/null
- Point you browser to both http://frontend/ and http://backend/ to test that it's working.