{"id":18651077,"url":"https://github.com/gagarine/docker-php","last_synced_at":"2025-04-11T15:31:05.363Z","repository":{"id":73273009,"uuid":"63454224","full_name":"gagarine/docker-php","owner":"gagarine","description":"Docker for PHP development","archived":true,"fork":false,"pushed_at":"2017-06-30T16:00:39.000Z","size":90,"stargazers_count":19,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T10:13:13.677Z","etag":null,"topics":["docker","php","php-development"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gagarine.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-15T22:26:29.000Z","updated_at":"2024-12-28T16:43:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdc6bd45-0f4c-403a-ac4a-68901a073654","html_url":"https://github.com/gagarine/docker-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagarine%2Fdocker-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagarine%2Fdocker-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagarine%2Fdocker-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagarine%2Fdocker-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gagarine","download_url":"https://codeload.github.com/gagarine/docker-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248431351,"owners_count":21102187,"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","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":["docker","php","php-development"],"created_at":"2024-11-07T06:48:14.992Z","updated_at":"2025-04-11T15:31:05.355Z","avatar_url":"https://github.com/gagarine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker for PHP development on your local machine\n\nDocker for PHP development on mac OSX with [Docker for MAC](https://docs.docker.com/docker-for-mac/).\n\nThis was tested with: Drupal 6 and 7 and Symfony but should works with any PHP applications.\n\nBy default docker-compose will launch 4 containers:\n- nginx\n- phpfpm (7.0 or 5.7)\n- db (mariadb)\n- mailhog ([MailHog](https://github.com/mailhog/MailHog) is configured to catch all email send by the phpfpm server)\n\nNginx and phpfpm are on debian 8. Other containers are using smaller alpine image.\n\nYou can change the configuration of nginx or phpfpm in Dockerfiles folder to meet you need.\n\nThis project use http://docker-sync.io/ to sync your code with docker. This is a workaround to get (very) good performance until Docker for MAC shared volume is fixed.\n\nTo install docker-sync:\n\n    $ gem install docker-sync\n\n## Start a new project\n\nCopy every file of this repository in the root of your project.\n\nBy default nginx is configured to serve ./app/web. So, add your code in ./app/web, then:\n\nIn a terminal start the synchronisation and let it run:\n\n    $ docker-sync start\n\nIn another terminal launch your containers:\n\n    $ docker-compose up\n    \nAll logs are redirected to the console, so you can quickly check nginx, php or mysql message.\n\nThen load [http://localhost:8080](http://localhost:8080) on your browser, you should see your PHP app.\n\n\n## PHP version\n\nConfigurations for PHP7.0 and PHP5.6 are provided and work out of the box. You can chose the version you want by editing the docker-compose.yml file:\n\nFor PHP 5.7:\n\n    phpfpm:\n        build:\n            context: ./Dockerfiles/phpfpm/5.7\n\nFor PHP 7.0:\n\n    phpfpm:\n        build:\n            context: ./Dockerfiles/phpfpm/7.0\n            \n\n## Access DB on localhost\n\nThe DB port is exposed. To easily access it you can add this to your /etc/hosts\n\n    db 127.0.0.1\n    \n## Emails\n\nAll emails are caught (no email can go out accidentally) and stored in RAM. You can read emails on the MailHog web interface: [http://localhost:8025](http://localhost:8025) .\n\n![Screenshot of MailHog web interface](https://raw.githubusercontent.com/mailhog/MailHog/master/docs/MailHog.png \"MailHog web interface\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagarine%2Fdocker-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgagarine%2Fdocker-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagarine%2Fdocker-php/lists"}