@@ -4,7 +4,7 @@ You can use [PHP-PM](https://github.com/php-pm/php-pm) using Docker. We provide
4
4
5
5
## Images
6
6
7
- - [ ` phppm/nginx ` ] ( https://hub.docker.com/r/phppm/nginx/ ) : Contains php-pm and uses NGiNX as static file serving
7
+ - [ ` phppm/nginx ` ] ( https://hub.docker.com/r/phppm/nginx/ ) : Contains php-pm and uses NGiNX as static file serving
8
8
- [ ` phppm/standalone ` ] ( https://hub.docker.com/r/phppm/standalone/ ) : Contains php-pm and uses php-pm's ability to serve static files (slower)
9
9
- [ ` phppm/ppm ` ] ( https://hub.docker.com/r/phppm/ppm/ ) : Just the php-pm binary as entry point
10
10
@@ -19,22 +19,22 @@ $ docker run -v `pwd`:/var/www/ phppm/ppm --help
19
19
$ docker run -v `pwd`:/var/www/ phppm/ppm config --help
20
20
21
21
# with nginx as static file server
22
- $ docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx
22
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx
23
23
24
24
# with php-pm as static file server (dev only)
25
- $ docker run -v `pwd`:/var/www -p 8080:80 phppm/standalone
25
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/standalone
26
26
27
27
# use `PPM_CONFIG` environment variable to choose a different ppm config file.
28
- $ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx -c ppm-prod.json
28
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx -c ppm-prod.json
29
29
30
30
# enable file tracking, to automatically restart ppm when php source changed
31
- $ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --debug=1 --app-env=dev
31
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --debug=1 --app-env=dev
32
32
33
33
# change static file directory. PPM_STATIC relative to mounted /var/www/.
34
- $ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --static-directory=web/
34
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --static-directory=web/
35
35
36
36
# Use 16 threads/workers for PHP-PM.
37
- $ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=16
37
+ $ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --workers=16
38
38
```
39
39
40
40
Docker compose
@@ -49,22 +49,22 @@ services:
49
49
volumes:
50
50
- ./symfony-app/:/var/www
51
51
ports:
52
- - "80:80 "
52
+ - "80:8080 "
53
53
```
54
54
55
55
### Configuration
56
56
57
- You should configure PPM via the ppm.json in the root directory, which is within the container mounted to
57
+ You should configure PPM via the ppm.json in the root directory, which is within the container mounted to
58
58
` /var/www/ ` . Alternatively, you can overwrite each option using the regular cli arguments.
59
59
60
60
```
61
61
# change the ppm.json within current directory
62
62
docker run -v `pwd`:/var/www phppm/ppm config --help
63
63
64
64
# not persisting config changes
65
- docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --help
66
- docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=1 --debug 1
67
- docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --c prod-ppm.json
65
+ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --help
66
+ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --workers=1 --debug 1
67
+ docker run -v `pwd`:/var/www -p 80:8080 phppm/nginx --c prod-ppm.json
68
68
```
69
69
70
70
## Build image with own tools/dependencies
@@ -79,7 +79,7 @@ FROM phppm/nginx:1.0
79
79
RUN apk --no-cache add git
80
80
RUN apk --no-cache add ca-certificates wget
81
81
82
- # whatever you need
82
+ # whatever you need
83
83
```
84
84
85
85
```
0 commit comments