- Change directory to your working dir
cd ~/path/to/working/dir
- Clone this repo
git clone https://github.com/cmr1/docker-yii.git
- Enter this repo directory
cd docker-yii
- Create local GitHub token file (for PHP composer install during build)
- Generate a GitHub access token
- This token is for authentication only, it does not require ANY permissions!
echo "MY-SUPER-SECRET-GITHUB-TOKEN" > .github.token
- Replace
MY-SUPER-SECRET-GITHUB-TOKEN
with the token generated above - This file must be created, because it is ignored in
.gitignore
- Replace
- Build Docker containers
docker-compose build
- Install composer packages on mounted volume
docker-compose run app composer install
- Run Docker containers
docker-compose up
- Visit in your browser!