-
Notifications
You must be signed in to change notification settings - Fork 6
How To Install Yii2 Framework Basic Template on Laradock
Yuda Sukmana edited this page Dec 18, 2017
·
2 revisions
- Download or Clone this repo to your local machine in you working directory
git clone https://github.com/ydatech/yii2-laradock.git
- Create .env file (you can copy from env-example)
cd yii2-laradock
cp env-example .env
- run
docker-compose up -d nginx mysql
- run
docker-compose ps
to see running containers, make sure that nginx mysql and workspace are up. - enter workspace container
docker-compose exec --u=laradock workspace bash
- You can now install Yii2 Framework under
/var/www
in workspace container. - run
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
- run
cd basic
- run
yii
oryii_test
you should see yii2 console command. - Dont forget to create nginx server configuration for example :
yii2-laradock/nginx/sites/basic.conf
. - See the sample conf from
yii2-laradock/nginx/sites/app.conf.example
, you can use this configuration and change the root and servername to:
server_name basic.localhost;
root /var/www/basic/web;
- Verify your installation by navigating http://basic.localhost on Google Chrome