Skip to content

Commit 59e4b25

Browse files
author
Ric Harvey
committed
Adding docker compose guide
1 parent df8d254 commit 59e4b25

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ For more detailed examples and explanations please refer to the documentation.
6060

6161
## Guides
6262
- [Running in Kubernetes](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/guides/kubernetes.md)
63+
- [Using Docker Compose](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/guides/docker_compose.md)

docs/guides/docker_compose.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
## Docker Compose Guide
3+
This guide will show you how to make a quick and easy docker compose file to get your container running using the compose tool.
4+
5+
6+
### Creating a copomse file
7+
Create a docker-compose.yml file with the following contents:
8+
9+
```
10+
version: '2'
11+
12+
services:
13+
nginx-php-fpm:
14+
image: richarvey/nginx-php-fpm:latest
15+
restart: always
16+
environment:
17+
SSH_KEY: '<YOUR _KEY_HERE>'
18+
GIT_REPO: 'git@github.com:<YOUR_ACCOUNT>/<YOUR_REPO?.git'
19+
GIT_EMAIL: 'void@ngd.io'
20+
GIT_NAME: '<YOUR_NAME>'
21+
```
22+
You can of course expand on this and add volumes, or extra environment parameters as defined in the [config flags](../config_flags.md) documentation.
23+
24+
### Running
25+
To start the container simply run: ```docker-compose up -d```
26+
27+
### Clean Up
28+
To shut down the compose network and container runt he following command: ```docker-compose down```

0 commit comments

Comments
 (0)