Skip to content

Commit

Permalink
Adding docker compose guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Ric Harvey committed Feb 17, 2017
1 parent df8d254 commit 59e4b25
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
28 changes: 28 additions & 0 deletions docs/guides/docker_compose.md
Original file line number Diff line number Diff line change
@@ -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: '<YOUR _KEY_HERE>'
GIT_REPO: 'git@github.com:<YOUR_ACCOUNT>/<YOUR_REPO?.git'
GIT_EMAIL: 'void@ngd.io'
GIT_NAME: '<YOUR_NAME>'
```
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```

0 comments on commit 59e4b25

Please sign in to comment.