-
Clone/Upload
For install advanced Yii2 application edit docker-compose.yml
- ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced #- ./docker/nginx/conf.dbasic:/etc/nginx/conf.d # - basic
For install basic Yii2 application edit docker-compose.yml
#- ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced - ./docker/nginx/conf.dbasic:/etc/nginx/conf.d # - basic
Uncomment the version you need
php: build: #context: ./docker/php/build/7.0 context: ./docker/php/build/7.1 #context: ./docker/php/build/5.6
-
Run #docker-compose up -d --build and wait until the deploy is complete
Params for connect to service
Mysql:
host: 172.18.33.2 port: 3306 user: root password: 12345 database: test
Redis:
host: 172.18.33.3 port: 6379 password: 123456 database: from 1 to 16
-
Enter in php container
docker exec -it php bash
-
For install advanced Yii2 application run in container
composer create-project --prefer-dist yiisoft/yii2-app-advanced ./ php init
For install basic Yii2 application run in container
composer create-project --prefer-dist yiisoft/yii2-app-basic ./
-
Wait until the composer finishes
-
Configure Yii2 application and run
php yii migrate/up
-
The application is available at
http://mysite.local
-
Notifications
You must be signed in to change notification settings - Fork 0
Desure85/yii2-docker-enviroment
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Yii2 docker enviroment with Nginx, Mysql, Redis and PHP with many php extensions(php_rdkafka and etc)
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published