Skip to content

Commit f83db94

Browse files
authored
Updates to PHP 8.1 (#7)
1 parent 0cf13a0 commit f83db94

File tree

7 files changed

+45
-38
lines changed

7 files changed

+45
-38
lines changed

.assets/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
require __DIR__ . '/bootstrap_cli.php';
140140
}
141141

142+
142143
/*
143144
* Set the full base URL.
144145
* This URL is used as the base of all absolute links.

.docker/php/docker-healthcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if curl -v -o /dev/null http://localhost:8080; then
99
exit 0
1010
fi
1111

12-
exit 1
12+
exit 1

.github/workflows/build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ jobs:
1919
run: docker-compose build --build-arg UID=$(id -u) --build-arg ENV=dev
2020
- name: Start
2121
run: docker-compose up -d
22-
- name: Wait for services
23-
run: sleep 10
2422
- name: Check CakePHP Welcome Page
25-
run: curl -f -v -o /dev/null http://localhost:8080
23+
uses: nick-fields/retry@v2
24+
with:
25+
timeout_seconds: 10
26+
max_attempts: 10
27+
command: curl -f -v -o /dev/null http://localhost:8080
2628
- name: Check NGINX Files
27-
run: curl -f -v -o /dev/null http://localhost:8080/css/home.css
29+
uses: nick-fields/retry@v2
30+
with:
31+
timeout_seconds: 10
32+
max_attempts: 5
33+
command: curl -f -v -o /dev/null http://localhost:8080/css/home.css

.github/workflows/image.yml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fi
2525
TAGS="${DOCKER_IMAGE}:${VERSION}"
2626
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
27-
TAGS="$TAGS,${DOCKER_IMAGE}:4.2-latest"
27+
TAGS="$TAGS,${DOCKER_IMAGE}:4.4-latest"
2828
fi
2929
echo ::set-output name=tags::${TAGS}
3030
-

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
22
# container
33
# @see https://hub.docker.com/repository/docker/cnizzardini/php-fpm-alpine
4-
# @see https://github.com/cnizzardini/php-fpm-alpine/tree/php-8.0
5-
FROM cnizzardini/php-fpm-alpine:8.0-latest AS cakephp_php
4+
# @see https://github.com/cnizzardini/php-fpm-alpine/tree/php-8.1
5+
FROM cnizzardini/php-fpm-alpine:8.1-latest AS cakephp_php
66

77
ARG ENV=prod
88
ARG UID=1000
@@ -24,9 +24,9 @@ fi
2424
#
2525
# application
2626
#
27-
COPY .docker/php/docker-healthcheck.sh /usr/local/bin/docker-healthcheck
28-
RUN chmod +x /usr/local/bin/docker-healthcheck
29-
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["docker-healthcheck"]
27+
#COPY .docker/php/docker-healthcheck.sh /usr/local/bin/docker-healthcheck
28+
#RUN chmod +x /usr/local/bin/docker-healthcheck
29+
#HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["docker-healthcheck"]
3030

3131
COPY .docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
3232
RUN chmod +x /usr/local/bin/docker-entrypoint

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
[![CakePHP](https://img.shields.io/badge/cakephp-4.2-red?logo=cakephp)](https://book.cakephp.org/4/en/index.html)
66
[![Docker](https://img.shields.io/badge/docker-ffffff.svg?logo=docker)](.docker)
77
[![Kubernetes](https://img.shields.io/badge/kubernetes-D3D3D3.svg?logo=kubernetes)](.kube)
8-
[![PHP](https://img.shields.io/badge/php-7.4-8892BF.svg?logo=php)](https://hub.docker.com/_/php)
8+
[![PHP](https://img.shields.io/badge/php-8.1-8892BF.svg?logo=php)](https://hub.docker.com/_/php)
99
[![NGINX](https://img.shields.io/badge/nginx-1.19-009639.svg?logo=nginx)](https://hub.docker.com/_/nginx)
1010
[![MySQL](https://img.shields.io/badge/mysql-8-00758F.svg?logo=mysql)](https://hub.docker.com/_/mysql)
1111

1212
A [mixerapi/mixerapi](https://github.com/mixerapi/mixerapi) application template for Docker Compose and Kubernetes
13-
based on the official [cakephp/app 4.2](https://github.com/cakephp/app) template.
13+
based on the official [cakephp/app 4.4](https://github.com/cakephp/app) template.
1414

1515
This project has been forked from [cnizzardini/cakephp-docker](https://github.com/cnizzardini/cakephp-docker).
1616

@@ -19,11 +19,11 @@ This project has been forked from [cnizzardini/cakephp-docker](https://github.co
1919
- [Docker 20](https://docs.docker.com/engine/release-notes/) or higher
2020
- Make
2121

22-
| Service | Host:Port | Docker Host | Image |
23-
| ----------- | ----------- | ----------- | ----------- |
24-
| PHP8.0-FPM w/ Xdebug 3 | - | php | [cnizzardini/php-fpm-alpine:8.0-latest](https://hub.docker.com/r/cnizzardini/php-fpm-alpine) |
25-
| NGINX 1.19 | localhost:8080 | web | [nginx:1.19-alpine](https://hub.docker.com/_/nginx) |
26-
| MySQL 8 | localhost:3607 | db | [library/mysql:8](https://hub.docker.com/_/mysql) |
22+
| Service | Host:Port | Docker Host | Image |
23+
|------------------------|----------------|-------------|----------------------------------------------------------------------------------------------|
24+
| PHP8.1-FPM w/ Xdebug 3 | - | php | [cnizzardini/php-fpm-alpine:8.1-latest](https://hub.docker.com/r/cnizzardini/php-fpm-alpine) |
25+
| NGINX 1.19 | localhost:8080 | web | [nginx:1.19-alpine](https://hub.docker.com/_/nginx) |
26+
| MySQL 8 | localhost:3607 | db | [library/mysql:8](https://hub.docker.com/_/mysql) |
2727

2828

2929
- [Installation](#installation)
@@ -67,26 +67,26 @@ After install browse to [http://localhost:8080](http://localhost:8080) to see th
6767
A [Makefile](Makefile) is provided with some optional commands for your convenience. Please review the Makefile as
6868
these commands are not exact aliases of docker-compose commands.
6969

70-
| Make Command | Description |
71-
| ----------- | ----------- |
72-
| `make` | Shows all make target commands |
73-
| `make init` | Runs docker build, docker-compose up, and copies over env files |
74-
| `make init.nocache` | Same as make.init but builds with --no-cache |
75-
| `make start` | Starts services `docker-compose -f .docker/docker-compose.yml start` |
76-
| `make stop` | Stops services `docker-compose -f .docker/docker-compose.yml stop` |
77-
| `make up` | Create and start containers `docker-compose -f .docker/docker-compose.yml up -d` |
78-
| `make down` | Take down and remove all containers `docker-compose -f .docker/docker-compose.yml down` |
79-
| `make restart` | Restarts services `docker-compose -f .docker/docker-compose.yml restart` |
80-
| `make php.sh` | PHP terminal `docker exec -it --user cakephp <PHP_CONTAINER> sh` |
81-
| `make php.restart` | Restarts the PHP container |
82-
| `make db.sh` | DB terminal `docker exec -it <DB_CONTAINER> sh` |
83-
| `make db.mysql` | MySQL terminal `mysql -u root -h 0.0.0.0 -p --port 3307` |
84-
| `make web.sh` | Web terminal `docker exec -it <WEB_CONTAINER> sh` |
85-
| `make xdebug.on` | Restarts PHP container with xdebug.mode set to debug,coverage |
86-
| `make xdebug.off` | Restarts PHP container with xdebug.mode set to off |
87-
| `make composer.install` | `docker exec <PHP_CONTAINER> composer install --no-interaction` |
88-
| `make composer.test` | `docker exec <PHP_CONTAINER> composer test` |
89-
| `make composer.check` | `docker exec <PHP_CONTAINER> composer check` |
70+
| Make Command | Description |
71+
|-------------------------|-----------------------------------------------------------------------------------------|
72+
| `make` | Shows all make target commands |
73+
| `make init` | Runs docker build, docker-compose up, and copies over env files |
74+
| `make init.nocache` | Same as make.init but builds with --no-cache |
75+
| `make start` | Starts services `docker-compose -f .docker/docker-compose.yml start` |
76+
| `make stop` | Stops services `docker-compose -f .docker/docker-compose.yml stop` |
77+
| `make up` | Create and start containers `docker-compose -f .docker/docker-compose.yml up -d` |
78+
| `make down` | Take down and remove all containers `docker-compose -f .docker/docker-compose.yml down` |
79+
| `make restart` | Restarts services `docker-compose -f .docker/docker-compose.yml restart` |
80+
| `make php.sh` | PHP terminal `docker exec -it --user cakephp <PHP_CONTAINER> sh` |
81+
| `make php.restart` | Restarts the PHP container |
82+
| `make db.sh` | DB terminal `docker exec -it <DB_CONTAINER> sh` |
83+
| `make db.mysql` | MySQL terminal `mysql -u root -h 0.0.0.0 -p --port 3307` |
84+
| `make web.sh` | Web terminal `docker exec -it <WEB_CONTAINER> sh` |
85+
| `make xdebug.on` | Restarts PHP container with xdebug.mode set to debug,coverage |
86+
| `make xdebug.off` | Restarts PHP container with xdebug.mode set to off |
87+
| `make composer.install` | `docker exec <PHP_CONTAINER> composer install --no-interaction` |
88+
| `make composer.test` | `docker exec <PHP_CONTAINER> composer test` |
89+
| `make composer.check` | `docker exec <PHP_CONTAINER> composer check` |
9090

9191
### PHP
9292

app/.gitkeep

100644100755
File mode changed.

0 commit comments

Comments
 (0)