From cfe16a52d7d1cb71f95d093802e6797099126f41 Mon Sep 17 00:00:00 2001 From: Tobias Munk Date: Tue, 6 Feb 2018 22:07:24 +0100 Subject: [PATCH] Feature/docker support (#157) * added Docker support * updated Docker docs --- README.md | 23 +++++++++++++++++++++++ docker-compose.yml | 9 +++++++++ 2 files changed, 32 insertions(+) create mode 100644 docker-compose.yml 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