diff --git a/README.md b/README.md index 1caaca9..d3dc4b7 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,29 @@ http://localhost/basic/web/ ~~~ +### Install with Docker + +Update your vendor packages + + docker-compose run --rm php composer update --prefer-dist + +Run the installation triggers (creating cookie validation code) + + docker-compose run --rm php composer install + +Start the container + + docker-compose up -d + +You can then access the application through the following URL: + + http://127.0.0.1:8000 + +**NOTES:** +- Minimum required Docker engine version `17.04` for development (see [Performance tuning for volume mounts](https://docs.docker.com/docker-for-mac/osxfs-caching/)) +- The default configuration uses a host-volume in your home directory `.docker-composer` for composer caches + + CONFIGURATION ------------- diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c3800ff --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '2' +services: + php: + image: yiisoftware/yii2-php:7.1-apache + volumes: + - ~/.composer-docker/cache:/root/.composer/cache:delegated + - ./:/app:delegated + ports: + - '8000:80' \ No newline at end of file