{"id":13684643,"url":"https://github.com/cnizzardini/cakephp-docker","last_synced_at":"2025-08-22T03:32:34.942Z","repository":{"id":37036905,"uuid":"298841056","full_name":"cnizzardini/cakephp-docker","owner":"cnizzardini","description":"A cakephp 5 template for Docker","archived":false,"fork":false,"pushed_at":"2024-11-25T19:01:19.000Z","size":402,"stargazers_count":29,"open_issues_count":4,"forks_count":21,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:51:26.346Z","etag":null,"topics":["cakephp","cakephp-docker","cakephp4","docker","docker-compose","docker-compose-template","docker-template"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnizzardini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-26T15:15:52.000Z","updated_at":"2024-11-25T18:56:14.000Z","dependencies_parsed_at":"2024-04-10T08:53:27.025Z","dependency_job_id":null,"html_url":"https://github.com/cnizzardini/cakephp-docker","commit_stats":null,"previous_names":[],"tags_count":15,"template":true,"template_full_name":null,"purl":"pkg:github/cnizzardini/cakephp-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnizzardini%2Fcakephp-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnizzardini%2Fcakephp-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnizzardini%2Fcakephp-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnizzardini%2Fcakephp-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnizzardini","download_url":"https://codeload.github.com/cnizzardini/cakephp-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnizzardini%2Fcakephp-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271579441,"owners_count":24784250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp","cakephp-docker","cakephp4","docker","docker-compose","docker-compose-template","docker-template"],"created_at":"2024-08-02T14:00:36.170Z","updated_at":"2025-08-22T03:32:34.671Z","avatar_url":"https://github.com/cnizzardini.png","language":"PHP","readme":"# \u0026#127856; CakePHP Docker\n\n[![Build](https://github.com/cnizzardini/cakephp-docker/workflows/Build/badge.svg?branch=master)](https://github.com/cnizzardini/cakephp-docker/actions)\n[![CakePHP](https://img.shields.io/badge/cakephp-5-red?logo=cakephp)](https://book.cakephp.org/5/en/index.html)\n[![Docker](https://img.shields.io/badge/docker-ffffff.svg?logo=docker)](.docker)\n[![Kubernetes](https://img.shields.io/badge/kubernetes-D3D3D3.svg?logo=kubernetes)](.kube)\n[![PHP](https://img.shields.io/badge/php-8.3-8892BF.svg?logo=php)](https://hub.docker.com/_/php)\n[![NGINX](https://img.shields.io/badge/nginx-1.19-009639.svg?logo=nginx)](https://hub.docker.com/_/nginx)\n[![MySQL](https://img.shields.io/badge/mysql-8-00758F.svg?logo=mysql)](https://hub.docker.com/_/mysql)\n\nA [cakephp/app](https://github.com/cakephp/app) template for Docker Compose and Kubernetes. You might also be\ninterested in [CakePHP Galley](https://gitlab.com/amayer5125/galley) which is similar to Laravel Sail\nor [DevilBox](https://devilbox.readthedocs.io/en/latest/examples/setup-cakephp.html).\n\n#### Dependencies:\n\n- [Docker 20](https://docs.docker.com/engine/release-notes/) or higher\n- Make\n\n| Service                | Host:Port      | Docker Host | Image                                                                                        |\n|------------------------|----------------|-------------|----------------------------------------------------------------------------------------------|\n| PHP8.3-FPM w/ Xdebug 3 | -              | php         | [cnizzardini/php-fpm-alpine:8.3-latest](https://hub.docker.com/r/cnizzardini/php-fpm-alpine) |\n| NGINX 1.19             | localhost:8080 | web         | [nginx:1.19-alpine](https://hub.docker.com/_/nginx)                                          |\n| MySQL 8                | localhost:3607 | db          | [library/mysql:8](https://hub.docker.com/_/mysql)                                            |\n\n\n- [Installation](#installation)\n- [MacOS Notes](#mac-notes)\n- [Usage](#usage)\n  - [PHP](#php)\n  - [MySQL](#mysql)\n  - [NGINX](#nginx)\n  - [Xdebug](#xdebug)\n- [Reinstall](#reinstall)\n\n## Installation\n\nFork and clone this repository then run:\n\n```console\nmake init\n```\n\nThat's it! Now just remove `app/*` from [.gitignore](.gitignore). You may also want to remove\n[.assets](.assets) and adjust defaults in [.github](.github), [.docker](.docker), and [.kube](.kube).\n\n\u003e Note: `make init` and `make init.nocache` output interactively, while `make start` and `make up` do not.\n\n## Mac Notes\n\n1. Change your `SHELL` in the Makefile to `/bin/zsh`. This improves various output from the Makefile such as emoji's.\n\n3. Mac ships with an older version of `sed` so install `gnu-sed` for some targets in the Makefile:\n\n```console\nbrew install gnu-sed\n```\n\nThen update `sed` to `gsed` in the Makefile.\n\n## Usage\n\nAfter install browse to [http://localhost:8080](http://localhost:8080) to see the CakePHP welcome page.\n\nA [Makefile](Makefile) is provided with some optional commands for your convenience. Please review the Makefile as\nthese commands are not exact aliases of docker-compose commands.\n\n| Make Command            | Description                                                                             |\n|-------------------------|-----------------------------------------------------------------------------------------|\n| `make`                  | Shows all make target commands                                                          |\n| `make init`             | Runs docker build, docker-compose up, and copies over env files                         |\n| `make init.nocache`     | Same as make.init but builds with --no-cache                                            |\n| `make start`            | Starts services `docker-compose -f .docker/docker-compose.yml start`                    |\n| `make stop`             | Stops services `docker-compose -f .docker/docker-compose.yml stop`                      |\n| `make up`               | Create and start containers `docker-compose -f .docker/docker-compose.yml up -d`        |\n| `make down`             | Take down and remove all containers `docker-compose -f .docker/docker-compose.yml down` |\n| `make restart`          | Restarts services `docker-compose -f .docker/docker-compose.yml restart`                |\n| `make php.sh`           | PHP terminal `docker exec -it --user cakephp \u003cPHP_CONTAINER\u003e sh`                        |\n| `make php.restart`      | Restarts the PHP container                                                              |\n| `make db.sh`            | DB terminal `docker exec -it \u003cDB_CONTAINER\u003e sh`                                         |\n| `make db.mysql`         | MySQL terminal `mysql -u root -h 0.0.0.0 -p --port 3307`                                |\n| `make web.sh`           | Web terminal `docker exec -it \u003cWEB_CONTAINER\u003e sh`                                       |\n| `make xdebug.on`        | Restarts PHP container with xdebug.mode set to debug,coverage                           |\n| `make xdebug.off`       | Restarts PHP container with xdebug.mode set to off                                      |\n| `make composer.install` | `docker exec \u003cPHP_CONTAINER\u003e composer install --no-interaction`                         |\n| `make composer.test`    | `docker exec \u003cPHP_CONTAINER\u003e composer test`                                             |\n| `make composer.check`   | `docker exec \u003cPHP_CONTAINER\u003e composer check`                                            |\n\n### PHP\n\nSee [.docker/README.md](.docker/README.md) for details.\n\nShell:\n\n```console\nmake php.sh\n```\n\nHelper commands:\n\n```console\nmake composer.install\nmake composer.test\nmake composer.check\n```\n\n### MySQL\n\nSee [.docker/README.md](.docker/README.md) for details.\n\nShell:\n\n```console\nmake db.sh\n```\n\nMySQL shell (requires mysql client on your localhost):\n\n```console\nmake db.mysql\n```\n\n### NGINX\n\nSee [.docker/README.md](.docker/README.md) for details.\n\nShell:\n\n```console\nmake web.sh\n```\n\n### Xdebug\n\nXdebug is disabled by default. To toggle:\n\n```console\nmake xdebug.on\nmake xdebug.off\n```\n\n### PHPStorm + Xdebug\n\nXdebug 3's default port is `9003`.\n\nGo to `File \u003e Settings \u003e Languages \u0026 Frameworks \u003e PHP \u003e Servers`\n\n- Name: `localhost`\n- Host: `localhost`\n- Port: `8080`\n- Debugger: `Xdebug`\n- Use path mappings: `Enable`\n\nMap your project's app directory to the absolute path on the docker container `/srv/app`\n\n## Reinstall\n\nTo completely reinstall delete existing containers and images, then remove the `app/` directory and run `make init`\nagain.\n","funding_links":[],"categories":["Development Environment"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnizzardini%2Fcakephp-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnizzardini%2Fcakephp-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnizzardini%2Fcakephp-docker/lists"}