Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0466991

Browse files
committed
update README
1 parent dd80008 commit 0466991

File tree

1 file changed

+19
-34
lines changed

1 file changed

+19
-34
lines changed

‎README.md

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,8 @@
1-
## Introduction
2-
This is a Dockerfile to build a container image for nginx and php-fpm, with the ability to pull website code from git. The container also has the ability to update templated files with variables passed to docker in order to update your settings. There is also support for lets encrypt SSL support.
1+
#docker-nginx-php-git
2+
Minimal base image for hosting Nginx + PHP-FPM powered websites with Automatic Git Deployment functionalities including Webhooks
33

4-
### Git repository
5-
The source files for this project can be found here: [https://github.com/ngineered/nginx-php-fpm](https://github.com/ngineered/nginx-php-fpm)
4+
## Configuration
65

7-
If you have any improvements please submit a pull request.
8-
### Docker hub repository
9-
The Docker hub build can be found here: [https://registry.hub.docker.com/u/richarvey/nginx-php-fpm/](https://registry.hub.docker.com/u/richarvey/nginx-php-fpm/)
10-
## Versions
11-
| Tag | Nginx | PHP | Alpine |
12-
|-----|-------|-----|--------|
13-
| latest | 1.10.1 | 5.6.23 | 3.4 |
14-
| php5 | 1.10.1 | 5.6.23 | 3.4 |
15-
| php7 | 1.10.1 | 7.0.8 | 3.4 |
16-
17-
## Building from source
18-
To build from source you need to clone the git repo and run docker build:
19-
```
20-
git clone https://github.com/ngineered/nginx-php-fpm.git
21-
docker build -t nginx-php-fpm:latest .
22-
```
23-
24-
## Pulling from Docker Hub
25-
Pull the image from docker hub rather than downloading the git repo. This prevents you having to build the image on every docker host:
26-
```
27-
docker pull richarvey/nginx-php-fpm:latest
28-
```
29-
30-
## Running
31-
To simply run the container:
32-
```
33-
sudo docker run -d richarvey/nginx-php-fpm
34-
```
35-
36-
You can then browse to ```http://<DOCKER_HOST>:8080``` to view the default install files. To find your ```DOCKER_HOST``` use the ```docker inspect``` to get the IP address.
376
### Available Configuration Parameters
387

398
The following flags are a list of all the currently supported options that can be changed by passing in the variables to docker with the -e flag.
@@ -51,6 +20,8 @@ The following flags are a list of all the currently supported options that can b
5120
- **PHP_POST_MAX_SIZE** : Set a larger post_max_size, default is 100 Mb
5221
- **PHP_UPLOAD_MAX_FILESIZE** : Set a larger upload_max_filesize, default is 100 Mb
5322
- **DOMAIN** : Set domain name for Lets Encrypt scripts
23+
- **GIT_HOOK_TOKEN** : Auth-Token used for the [docker-hook](https://github.com/schickling/docker-hook) listener
24+
5425

5526
### Dynamically Pulling code from git
5627
One of the nice features of this container is its ability to pull code from a git repository with a couple of environmental variables passed at run time.
@@ -89,6 +60,15 @@ sudo docker exec -t <CONTAINER_NAME> /usr/bin/letsencrypt-renew
8960
```
9061
## Special Git Features
9162
You'll need some extra ENV vars to enable this feature. These are ```GIT_EMAIL``` and ```GIT_NAME```. This allows git to be set up correctly and allow the following commands to work.
63+
64+
### docker-hook - Git Webhook
65+
66+
`docker-hook` is preconfigured to listen to incoming HTTP requests on port 8555
67+
68+
All you have to do is setup the **GIT_HOOK_TOKEN** env var, and any requests to `http://yourdomain:8555/<GIT_HOOK_TOKEN>` will trigger a Git pull
69+
70+
More info on how it works here: [schickling/docker-hook](https://github.com/schickling/docker-hook)
71+
9272
### Push code to Git
9373
To push code changes made within the container back to git simply run:
9474
```
@@ -136,3 +116,8 @@ All logs should now print out in stdout/stderr and are available via the docker
136116
```
137117
docker logs <CONTAINER_NAME>
138118
```
119+
120+
## Thanks to
121+
* [ngineered/nginx-php-fpm](https://github.com/ngineered/nginx-php-fpm) - Base Docker image and Git push/pull functionalities
122+
* [schickling/docker-hook](https://github.com/schickling/docker-hook) - Git Webhook listener
123+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /