Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 8d24de8

Browse files
authored
Merge pull request #265 from jdeathe/centos-7-develop
Release changes for 2.2.3
2 parents f391a3c + 8747638 commit 8d24de8

File tree

16 files changed

+267
-206
lines changed

16 files changed

+267
-206
lines changed

.dockerignore

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
.env
2-
.env.example
3-
.git
4-
.gitignore
5-
dist
6-
images
7-
test
8-
docker-compose.yml
9-
LICENSE
10-
README-short.txt
11-
*.md
1+
/.env
2+
/.env.example
3+
/.git
4+
/.gitignore
5+
/dist
6+
/docs
7+
/images
8+
/test
9+
/docker-compose.yml
10+
/LICENSE
11+
/README-short.txt
12+
/*.md
1213
!README.md
1314
**/*.mk
14-
**/Makefile
15+
**/Makefile

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
.env
2-
packages
3-
dist
1+
/.env
2+
/dist

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44

55
Summary of release changes.
66

7+
### 2.2.3 - 2019-10-08
8+
9+
- Deprecate Makefile target `logs-delayed`; replaced with `logsdef`.
10+
- Updates source image to [2.6.1](https://github.com/jdeathe/centos-ssh/releases/tag/2.6.1).
11+
- Updates `httpd` packages to 2.4.6-90.
12+
- Updates `mod_fcgid` package to 2.3.9-6.
13+
- Updates `mod_ssl` package to 2.4.6-90.
14+
- Updates `test/health_status` helper script with for consistency.
15+
- Updates Makefile target `logs` to accept `[OPTIONS]` (e.g `make -- logs -ft`).
16+
- Updates info/error output for consistency.
17+
- Updates healthcheck failure messages to remove EOL character that is rendered in status response.
18+
- Updates wrapper script; only emit "waiting on" info message if bootstrap hasn't completed.
19+
- Updates ordering of Tags and respective Dockerfile links in README.md for readability.
20+
- Updates session test cases; replace PHP memcached session store with redis.
21+
- Adds improved test workflow; added `test-setup` target to Makefile.
22+
- Adds Makefile target `logsdef` to handle deferred logs output within a target chain.
23+
- Adds `/docs` directory for supplementary documentation and simplify README.
24+
- Adds test case for Apache `DirectoryIndex` default.
25+
- Fixes validation failure of 0 second --timeout value in `test/health_status`.
26+
- Removes PHP-FPM status handler configuration from the Apache server-status drop-in.
27+
728
### 2.2.2 - 2019-08-05
829

930
- Updates php-hello-world to [0.14.0](https://github.com/jdeathe/php-hello-world/releases/tag/0.14.0).

Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM jdeathe/centos-ssh:2.6.0
1+
FROM jdeathe/centos-ssh:2.6.1
22

33
# Use the form ([{fqdn}-]{package-name}|[{fqdn}-]{provider-name})
44
ARG PACKAGE_NAME="app"
55
ARG PACKAGE_PATH="/opt/${PACKAGE_NAME}"
66
ARG PACKAGE_RELEASE_VERSION="0.14.0"
7-
ARG RELEASE_VERSION="2.2.2"
7+
ARG RELEASE_VERSION="2.2.3"
88

99
# ------------------------------------------------------------------------------
1010
# Base install of required packages
@@ -14,15 +14,15 @@ RUN yum -y install \
1414
--disableplugin=fastestmirror \
1515
elinks-0.12-0.37.pre6.el7.0.1 \
1616
fcgi-2.4.0-25.el7 \
17-
httpd-2.4.6-88.el7.centos \
18-
httpd-tools-2.4.6-88.el7.centos \
19-
mod_fcgid-2.3.9-4.el7_4.1 \
20-
mod_ssl-2.4.6-88.el7.centos \
17+
httpd-2.4.6-90.el7.centos \
18+
httpd-tools-2.4.6-90.el7.centos \
19+
mod_fcgid-2.3.9-6.el7 \
20+
mod_ssl-2.4.6-90.el7.centos \
2121
php-cli-5.4.16-46.el7 \
2222
php-common-5.4.16-46.el7 \
23-
php-pecl-zendopcache-7.0.5-2.el7 \
2423
php-pecl-memcached-2.2.0-1.el7 \
2524
php-pecl-redis-2.2.8-1.el7 \
25+
php-pecl-zendopcache-7.0.5-2.el7 \
2626
&& yum versionlock add \
2727
elinks \
2828
fcgi \

Makefile

+38-7
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ Targets:
2525
images Show container's image details.
2626
load Loads from the distribution package. Requires
2727
DOCKER_IMAGE_TAG variable.
28-
logs Display log output from the running container.
29-
logs-delayed Display log output from the running container after
30-
backing off for STARTUP_TIME seconds. This can be
31-
necessary when chaining make targets together.
28+
logs [OPTIONS] Display log output from the container.
29+
logsdef Display log output from the container deferred for
30+
STARTUP_TIME seconds. This will work in a chain
31+
unlike the logs target.
32+
logs-delayed [DEPRECATED] Replaced with logsdef.
3233
pause Pause the running container.
3334
pull Pull the release image from the registry. Requires
3435
the DOCKER_IMAGE_TAG variable.
@@ -45,6 +46,7 @@ Targets:
4546
stop Stop the container when in a running state.
4647
terminate Unpause, stop and remove the container.
4748
test Run all test cases.
49+
test-setup Install test dependencies.
4850
top [ps OPTIONS] Display the running processes of the container.
4951
unpause Unpause the container when in a paused state.
5052

@@ -161,6 +163,7 @@ endef
161163
_require-docker-image-tag \
162164
_require-docker-release-tag \
163165
_require-package-path \
166+
_require-root \
164167
_test-prerequisites \
165168
_usage \
166169
all \
@@ -176,6 +179,7 @@ endef
176179
images \
177180
load \
178181
logs \
182+
logsdef \
179183
logs-delayed \
180184
pause \
181185
pull \
@@ -191,6 +195,7 @@ endef
191195
stop \
192196
terminate \
193197
test \
198+
test-setup \
194199
top \
195200
unpause
196201

@@ -365,9 +370,17 @@ _require-package-path:
365370
exit 1; \
366371
fi
367372

373+
_require-root:
374+
@ if [[ $${EUID} -ne 0 ]]; \
375+
then \
376+
>&2 printf -- '%sMust be run as root\n' \
377+
"$(PREFIX_STEP_NEGATIVE)"; \
378+
exit 1; \
379+
fi
380+
368381
_test-prerequisites:
369382
ifeq ($(shpec),)
370-
$(error "Please install shpec.")
383+
$(error "Please install shpec. Try: DOCKER_NAME=$(DOCKER_NAME) make test-setup")
371384
endif
372385

373386
_usage:
@@ -581,14 +594,20 @@ install: | \
581594
logs: \
582595
_prerequisites \
583596
_require-docker-container
584-
@ $(docker) logs $(DOCKER_NAME)
597+
@ $(docker) logs \
598+
$(filter-out $@, $(MAKECMDGOALS)) \
599+
$(DOCKER_NAME)
600+
%:; @:
585601

586-
logs-delayed: \
602+
logsdef: \
587603
_prerequisites \
588604
_require-docker-container
589605
@ sleep $(STARTUP_TIME)
590606
@ $(MAKE) logs
591607

608+
logs-delayed: \
609+
logsdef
610+
592611
load: \
593612
_prerequisites \
594613
_require-docker-release-tag \
@@ -980,6 +999,18 @@ test: \
980999
"Functional test"
9811000
@ SHPEC_ROOT=$(SHPEC_ROOT) $(shpec)
9821001

1002+
test-setup: \
1003+
_require-root
1004+
@ printf -- '%s%s\n' \
1005+
"$(PREFIX_STEP)" \
1006+
"Installing shpec"
1007+
@ bash -c "$$(curl -LSs \
1008+
https://raw.githubusercontent.com/rylnd/shpec/master/install.sh \
1009+
)"
1010+
@ ln -sf \
1011+
/usr/local/bin/shpec \
1012+
/usr/bin/shpec
1013+
9831014
unpause: \
9841015
_prerequisites \
9851016
_require-docker-container \

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Tags and respective `Dockerfile` links
22

3-
- `centos-7`, `2.2.2` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-7/Dockerfile)
4-
- `centos-6`, `1.13.2` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
3+
- [`2.2.3`](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/releases/tag/2.2.3), `centos-7` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-7/Dockerfile)
4+
- [`1.13.3`](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/releases/tag/1.13.3), `centos-6` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
55

66
## Overview
77

@@ -25,7 +25,7 @@ $ docker run -d \
2525
--name apache-php.1 \
2626
-p 8080:80 \
2727
-e "APACHE_SERVER_NAME=app-1.local" \
28-
jdeathe/centos-ssh-apache-php-fcgi:2.2.2
28+
jdeathe/centos-ssh-apache-php-fcgi:2.2.3
2929
```
3030

3131
Go to `http://{{docker-host}}:8080` using a browser where `{{docker-host}}` is the host name of your docker server and, if all went well, you should see the "Hello, world!" page.
@@ -90,7 +90,7 @@ $ docker stop apache-php.1 && \
9090
--env "APACHE_SERVER_NAME=app-1.local" \
9191
--env "APACHE_SSL_PROTOCOL=All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1" \
9292
--env "PHP_OPTIONS_DATE_TIMEZONE=Europe/London" \
93-
jdeathe/centos-ssh-apache-php-fcgi:2.2.2
93+
jdeathe/centos-ssh-apache-php-fcgi:2.2.3
9494
```
9595

9696
#### Environment Variables
@@ -204,7 +204,7 @@ $ docker stop apache-php.1 && \
204204
--env "APACHE_SERVER_ALIAS=app-1" \
205205
--env "APACHE_SERVER_NAME=app-1.local" \
206206
--env "APACHE_MOD_SSL_ENABLED=true" \
207-
jdeathe/centos-ssh-apache-php-fcgi:2.2.2
207+
jdeathe/centos-ssh-apache-php-fcgi:2.2.3
208208
```
209209

210210
##### APACHE_MPM

docs/testing.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Testing
2+
3+
## Functional
4+
5+
The functional test cases are written in [shpec](https://github.com/rylnd/shpec).
6+
7+
To run the tests use the `test` Makefile target after building.
8+
9+
> *Note:* You might need to run via sudo if your environment requires root privileges to run docker.
10+
11+
```
12+
$ make build test
13+
```
+7-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
<IfVersion < 2.4>
2-
<Location "/server-status">
3-
SetHandler server-status
1+
<Location "/server-status">
2+
SetHandler server-status
3+
<IfVersion < 2.4>
44
Order deny,allow
55
Deny from all
66
Allow from localhost 127.0.0.1
7-
</Location>
8-
<Location "/status">
9-
SetHandler "proxy:unix:/run/php-fpm/${APACHE_RUN_USER}.sock|fcgi://localhost"
10-
Order deny,allow
11-
Deny from all
12-
Allow from localhost 127.0.0.1
13-
</Location>
14-
</IfVersion>
15-
16-
<IfVersion >= 2.4>
17-
<Location "/server-status">
18-
SetHandler server-status
19-
Require host localhost 127.0.0.1
20-
</Location>
21-
<Location "/status">
22-
SetHandler "proxy:unix:/run/php-fpm/${APACHE_RUN_USER}.sock|fcgi://localhost"
7+
</IfVersion>
8+
<IfVersion >= 2.4>
239
Require host localhost 127.0.0.1
24-
</Location>
25-
</IfVersion>
10+
</IfVersion>
11+
</Location>

0 commit comments

Comments
 (0)