{"id":15129794,"url":"https://github.com/prod3v3loper/docker","last_synced_at":"2026-02-09T00:31:00.055Z","repository":{"id":239655982,"uuid":"799563155","full_name":"prod3v3loper/docker","owner":"prod3v3loper","description":"🏗 Docker with Apache - PHP - MySQL - PhpMyAdmin - Mailhog | development environment","archived":false,"fork":false,"pushed_at":"2024-05-13T20:48:19.000Z","size":183,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T04:26:10.412Z","etag":null,"topics":["apache","development","development-environment","docker","docker-compose","docker-container","dockerfile","dump","environment","mailhog","mysql","mysql-database","php","php8","phpmyadmin"],"latest_commit_sha":null,"homepage":"https://www.prod3v3loper.com","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/prod3v3loper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-12T14:16:09.000Z","updated_at":"2024-06-12T13:03:47.000Z","dependencies_parsed_at":"2024-05-13T22:03:00.175Z","dependency_job_id":null,"html_url":"https://github.com/prod3v3loper/docker","commit_stats":null,"previous_names":["prod3v3loper/docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prod3v3loper/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prod3v3loper%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prod3v3loper%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prod3v3loper%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prod3v3loper%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prod3v3loper","download_url":"https://codeload.github.com/prod3v3loper/docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prod3v3loper%2Fdocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29251448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T22:49:53.206Z","status":"ssl_error","status_checked_at":"2026-02-08T22:49:51.384Z","response_time":57,"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":["apache","development","development-environment","docker","docker-compose","docker-container","dockerfile","dump","environment","mailhog","mysql","mysql-database","php","php8","phpmyadmin"],"created_at":"2024-09-26T02:20:31.129Z","updated_at":"2026-02-09T00:31:00.027Z","avatar_url":"https://github.com/prod3v3loper.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP 8 development environment \n\nWith **Apache** - **PHP** - **MySQL** - **PhpMyAdmin** - **Mailhog**\n\n| localhost | phpmyadmin | mailhog |\n| --- | --- | --- |\n| Server | Database | Email |\n| \u003cimg src=\"img/localhost.png\" width=\"424\"\u003e | \u003cimg src=\"img/phpmyadmin.png\" width=\"300\"\u003e | \u003cimg src=\"img/mailhog.png\" width=\"300\"\u003e |\n| http://localhost:8002 | http://localhost:8003 | http://localhost:7025 |\n\n\u003e You need to have Docker installed on your server to proceed using this PHP environment.\n\n\u003e Donwload Docker: https://www.docker.com/\n\nThe following four separate service containers will be used:\n\n- `php` service running PHP 8. (Created from Dockerfile)\n\n- `apache` service running Apache2. (Created from Dockerfile)\n\n- `db` service running MySQL. (Created from Image)\n\n- `phpmyadmin` service running PhpMyAdmin. (Created from Image)\n\n- `mailhog` service running Mailhog. (Created from Dockerfile and Image)\n\n# Setting up\n\nGet the project per `git` or donwload it from github https://github.com/prod3v3loper/docker/releases.\n\n```bash\n$ git clone https://github.com/prod3v3loper/docker.git\n```\n\n\u003e Before you start for the first time\n\nSet the MySQL environment variables creating a `.env` file, with:\n\n```js\n/* Default dont touch is defined in docker-compose.yml */\nDB_CONNECTION=mysql\nDB_HOST=db\nDB_PORT=3306\n\n/* Use what you want here */\nDB_DATABASE=databasename\nDB_USERNAME=username\nDB_PASSWORD=password\n```\n\n# Running the environment\n\nWhen the build is finished, you can run the environment in background mode with:\n```bash\n$ docker-compose up -d\n```\n\nStart with when mysql or other not running to log the states:\n```bash\n$ docker-compose up\n```\n\nRebuild to recreate the images and settings on startup:\n```bash\n$ docker-compose up -d --no-deps --build\n```\n\nRecreate the db on startup:\n```bash\n$ docker-compose up --force-recreate db\n```\n\nTo shut down your Docker Compose environment and remove all of its containers, networks, and volumes, run:\n```bash\n$ docker-compose down\n```\n\nNow go to your browser and access your server’s domain name or IP address on port 8002. \n\n| localhost | phpmyadmin | mailhog |\n| --- | --- | --- |\n| Server machine | PhpMyAdmin storage | Mail testing |\n| http://localhost:8002 | http://localhost:8003 | http://localhost:7025 |\n\n\u003e Defined in `docker-compose.yml`\n\n# Useful commands\n\n## Docker\n\nTo show information about the state of your active services (e.g. CONTAINER-ID), run:\n```bash\n$ docker ps\n```\n\nIf the container is running but not showing up with just docker ps, extend it with the -a parameter:\n```bash\n$ docker ps -a\n```\n\nGo direct in the container per bash:\n```bash\n$ docker exec -it \u003cCONTAINER-ID OR NAME\u003e bash\n```\n\n### Root\n\nInside the container you can run PHP\n```bash\n$ php -m\n```\n\nOr run composer\n```bash\n$ composer install \n```\n\n### More\n\nIf you not in a bash environment, get bash in this project and run:\n```bash\n$ docker exec -it \u003cCONTAINER-ID OR NAME\u003e /bin/bash\n```\n\nCopy files from container\n```bash\n$ docker cp \u003cCONTAINER-ID OR NAME\u003e:/usr/local/etc/php php\n```\n\nYou can use the docker exec command to execute commands in the service containers, without going into the container:\n```bash\n$ docker exec \u003cCONTAINER-ID OR NAME\u003e ls -l\n```\n\n```bash\n$ docker exec \u003cCONTAINER-ID OR NAME\u003e composer install\n```\n\n```bash\n$ docker exec \u003cCONTAINER-ID OR NAME\u003e php -m\n```\n\nBuild the app image to upload in dockerhub:\n```bash\n$ docker build \u003cCONTAINER-ID OR NAME\u003e\n```\n\n# Test\n\nCall the URLs to test database and mail.\n\n| Database | Email |\n| --- | --- | \n| Check after that in phpmyadmin | Check after that mailhog | \n| http://localhost:8002/dbtest/ | http://localhost:8002/mailtest/ |\n\n# ISSUE\n\nPlease use the issue tab to request a:\n\n* Bug\n* Feature\n\nChoose template and report a bug or feature you want [issues](https://github.com/prod3v3loper/docker/issues).\n\n# CONTRIBUTE\n\nPlease read the [contributing](https://github.com/prod3v3loper/docker/blob/master/.github/CONTRIBUTING.md) to contribute.\n\n# VULNERABILITY\n\nPlease use the Security section for privately reporting a [vulnerability](https://github.com/prod3v3loper/docker/security).\n\n# Authors\n\n**[PROD3V3LOPER](https://www.prod3v3loper.com)** - _All works_\n\n# License\n\n[MIT](https://github.com/prod3v3loper/docker/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprod3v3loper%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprod3v3loper%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprod3v3loper%2Fdocker/lists"}