From 59e4b25182a006c31adc89f432d0a47532eda361 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 17 Feb 2017 10:13:14 +0000 Subject: [PATCH] Adding docker compose guide --- README.md | 1 + docs/guides/docker_compose.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docs/guides/docker_compose.md diff --git a/README.md b/README.md index f7dac65c..d88d87e1 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,4 @@ For more detailed examples and explanations please refer to the documentation. ## Guides - [Running in Kubernetes](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/guides/kubernetes.md) +- [Using Docker Compose](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/guides/docker_compose.md) diff --git a/docs/guides/docker_compose.md b/docs/guides/docker_compose.md new file mode 100644 index 00000000..3c7f0449 --- /dev/null +++ b/docs/guides/docker_compose.md @@ -0,0 +1,28 @@ + +## Docker Compose Guide +This guide will show you how to make a quick and easy docker compose file to get your container running using the compose tool. + + +### Creating a copomse file +Create a docker-compose.yml file with the following contents: + +``` +version: '2' + +services: + nginx-php-fpm: + image: richarvey/nginx-php-fpm:latest + restart: always + environment: + SSH_KEY: '' + GIT_REPO: 'git@github.com:/' +``` +You can of course expand on this and add volumes, or extra environment parameters as defined in the [config flags](../config_flags.md) documentation. + +### Running +To start the container simply run: ```docker-compose up -d``` + +### Clean Up +To shut down the compose network and container runt he following command: ```docker-compose down```