Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

quick start

# First, run MySQL container.
docker run -d --name db_yii2 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=yii2 mysql

# Then run web server with Yii2 framework.
docker run -d --link db_yii2:mysql -p 8080:80 -e YII_CREATEPROJECT=1  -e YII_MIGRATE=1 chakphanu/yii2-advanced

Default ENVs

YII_FRONTEND_URLPATH=/
YII_BACKEND_URLPATH=/backend
DB_HOST="${MYSQL_NAME##*/}"
DB_NAME=$MYSQL_ENV_MYSQL_DATABASE
DB_USER=root
DB_PASS=$MYSQL_ENV_MYSQL_ROOT_PASSWORD

YII_MIGRATE=  # non-empty string for init or upgrade db.
YII_CREATEPROJECT=  # non-empty for create new project to empty directory.

Volume

mount project or empty directory to /var/www/yii2

Docker Pull Command
Owner
chakphanu