Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CakePHP 5 #32

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .assets/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
use Cake\Routing\Router;
use Cake\Utility\Security;

/**
* Load global functions.
*/
require CAKE . 'functions.php';

/*
* See https://github.com/josegonzalez/php-dotenv for API details.
*
Expand Down
2 changes: 1 addition & 1 deletion .docker/php/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/cakephp' ]; then
fi

COMPOSER_MEMORY_LIMIT=-1
composer create-project --prefer-dist --no-interaction cakephp/app:^4.4 .
composer create-project --prefer-dist --no-interaction cakephp/app:^5.0 .
rm -rf .github
cp config/.env.example config/.env
cp config/app_local.example.php config/app_local.php
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request]
jobs:
build:
name: Docker Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -14,11 +14,11 @@ jobs:
cp .docker/php.env.development .docker/php.env
cp .docker/mysql.env.development .docker/mysql.env
- name: Pull images
run: docker-compose pull
run: docker compose pull
- name: Build
run: docker-compose build --build-arg UID=$(id -u) --build-arg ENV=dev
run: docker compose build --build-arg UID=$(id -u) --build-arg ENV=dev
- name: Start
run: docker-compose up -d
run: docker compose up -d
- name: Wait for services
run: sleep 10
- name: Check CakePHP Welcome Page
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV HOST_OS=$HOST_OS
#
RUN if [[ "$ENV" != "prod" ]]; then \
apk add git \
&& apk add --no-cache --virtual .php-deps file re2c autoconf make zlib zlib-dev g++ curl \
&& apk add --update --no-cache --virtual .php-deps file re2c autoconf make zlib zlib-dev g++ curl linux-headers \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del -f .php-deps; \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 🍰 CakePHP Docker

[![Build](https://github.com/cnizzardini/cakephp-docker/workflows/Build/badge.svg?branch=master)](https://github.com/cnizzardini/cakephp-docker/actions)
[![CakePHP](https://img.shields.io/badge/cakephp-4-red?logo=cakephp)](https://book.cakephp.org/4/en/index.html)
[![CakePHP](https://img.shields.io/badge/cakephp-5-red?logo=cakephp)](https://book.cakephp.org/5/en/index.html)
[![Docker](https://img.shields.io/badge/docker-ffffff.svg?logo=docker)](.docker)
[![Kubernetes](https://img.shields.io/badge/kubernetes-D3D3D3.svg?logo=kubernetes)](.kube)
[![PHP](https://img.shields.io/badge/php-8.1-8892BF.svg?logo=php)](https://hub.docker.com/_/php)
Expand Down
Loading