{"id":15028370,"url":"https://github.com/zalkarz/php-docker","last_synced_at":"2026-03-17T23:03:36.129Z","repository":{"id":180449086,"uuid":"664735687","full_name":"zalkarz/php-docker","owner":"zalkarz","description":"PHP development environment with Docker","archived":false,"fork":false,"pushed_at":"2024-09-20T08:27:52.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-31T14:45:32.954Z","etag":null,"topics":["development-environment","docker","docker-compose","local-environment","php-docker","php82"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/zalkarz.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,"publiccode":null,"codemeta":null}},"created_at":"2023-07-10T16:19:33.000Z","updated_at":"2024-09-20T08:27:57.000Z","dependencies_parsed_at":"2024-11-18T23:45:50.456Z","dependency_job_id":"b1cfaf26-b07d-48e5-94ee-8999510a1964","html_url":"https://github.com/zalkarz/php-docker","commit_stats":null,"previous_names":["zalkarz/php-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zalkarz/php-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalkarz%2Fphp-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalkarz%2Fphp-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalkarz%2Fphp-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalkarz%2Fphp-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalkarz","download_url":"https://codeload.github.com/zalkarz/php-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalkarz%2Fphp-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["development-environment","docker","docker-compose","local-environment","php-docker","php82"],"created_at":"2024-09-24T20:08:10.039Z","updated_at":"2026-03-17T23:03:36.110Z","avatar_url":"https://github.com/zalkarz.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local PHP Development Environment with Docker\nThis repository provides a local PHP development environment using Docker. It sets up an Nginx web server, a MySQL database, and a PHP service, allowing you to develop and test PHP applications locally.\n\n## Docker Environment\n```shell\n# web server\n$ nginx -V\nnginx version: nginx/1.24.0\nbuilt by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) \nbuilt with OpenSSL 3.0.7 1 Nov 2022 (running with OpenSSL 3.0.9 30 May 2023)\nTLS SNI support enabled\n\n# php\n$ php -v\nPHP 8.2.6 (cli) (built: May 23 2023 09:45:31) (NTS)\nCopyright (c) The PHP Group\nZend Engine v4.2.6, Copyright (c) Zend Technologies\n\n# MySQL\n$ mysql -V\nmysql  Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)\n```\n\n## Prerequisites\nBefore getting started, ensure that you have the following prerequisites installed on your system:\n\n* Docker: [Installation Guide](https://docs.docker.com/get-docker/)\n* Docker Compose: [Installation Guide](https://docs.docker.com/compose/install/)\n\n## Getting Started\nTo use this local PHP development environment, follow these steps:\n\n__1. Clone this repository to your local machine:__\n```shell\n$ git clone https://github.com/zalkarz/php-docker.git\n```\n\n__2. Navigate to the cloned repository:__\n```shell\n$ cd ~/php-docker\n```\n\n__3. Create a `.env` file and set the required environment variables. You can use the provided `.env.example` file as a template:__\n```shell\n$ cp .env.example .env\n```\n\nUpdate the values in the .env file according to your requirements.\n\n__4. Start the Docker containers:__\n```shell\n$ docker-compose up -d\n```\nThis command will build the necessary images and start the containers in the background.\n\n__5. Access your PHP application in a web browser:__\n\nOpen your preferred web browser and visit http://localhost:8081 to access the PHP application running inside the Nginx container.\n\n__6. Develop your PHP application:__\n\nYou can make changes to your PHP code locally in the `./public/index.php` directory. The changes will be reflected inside the Nginx container automatically.\n\n__7. Stop the Docker containers:__\n\nWhen you're finished working with the environment, you can stop the Docker containers by running:\n```shell\n$ docker-compose down\n```\nThis command will stop and remove the containers, but it will preserve the data stored in the MySQL container.\n\n## Directory Structure\nThe repository has the following directory structure:\n\n```arduino\n.\n├── docker\n│   ├── mysql\n│   │   └── docker-entrypoint-initdb.d\n│   │   │   └── 001_dump.sql\n│   ├── php\n│   │   └── Dockerfile\n│   │   └── cancert.pem\n│   │   └── php.ini\n│   └── web\n│       └── default.conf\n├── public\n│   ├── index.php\n├── .env.example\n├── .gitignore\n├── docker-compose.yml\n└── README.md\n```\n\n* The `docker` directory contains Docker-related configuration files.\n  * The `mysql` directory is used to initialize the MySQL database with any SQL scripts placed inside the `docker-entrypoint-initdb.d` directory.\n  * The `php` directory contains the Dockerfile for building the PHP service image.\n  * The `web` directory contains the Nginx configuration file (`default.conf`).\n* The `public` directory contains `index.php` file, which is the entry point for all requests.\n* The `.env.example` file is a template for defining environment variables. Copy it to .env and update the values according to your requirements.\n* The `docker-compose.yml` file defines the services (web, mysql, and php) and their configurations.\n\n## Customization\nFeel free to customize the environment according to your needs. You can modify the Dockerfiles, Nginx configuration, or add additional services to the `docker-compose.yml` file.\n\n## License\nThis project is licensed under the [MIT](https://github.com/zalkarz/php-docker/blob/main/LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalkarz%2Fphp-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalkarz%2Fphp-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalkarz%2Fphp-docker/lists"}