{"id":16668204,"url":"https://github.com/danielberndt/local-macos-php-development","last_synced_at":"2026-03-18T21:20:00.580Z","repository":{"id":146846552,"uuid":"254624097","full_name":"danielberndt/local-macos-php-development","owner":"danielberndt","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-24T11:56:11.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T00:16:34.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/danielberndt.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":"2020-04-10T12:01:32.000Z","updated_at":"2023-04-24T12:26:22.000Z","dependencies_parsed_at":"2024-01-24T13:01:37.279Z","dependency_job_id":null,"html_url":"https://github.com/danielberndt/local-macos-php-development","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielberndt/local-macos-php-development","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberndt%2Flocal-macos-php-development","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberndt%2Flocal-macos-php-development/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberndt%2Flocal-macos-php-development/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberndt%2Flocal-macos-php-development/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielberndt","download_url":"https://codeload.github.com/danielberndt/local-macos-php-development/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberndt%2Flocal-macos-php-development/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259719721,"owners_count":22901240,"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":[],"created_at":"2024-10-12T11:16:33.612Z","updated_at":"2026-02-01T00:10:23.417Z","avatar_url":"https://github.com/danielberndt.png","language":"Dockerfile","readme":"# What does it do?\n\nAssume all your wordpress/php projects are located within a `_Sites` folder.\nPut this repo into the parent directory and execute the steps below. You'll now be able to open http://[SUBDIRNAME].test into your browser and see the contents of `_Sites/SUBDIRNAME` rendered by php.\n\n# SETUP\n\n## Start the docker container\n\n- `docker-compose up`\n  this exposes php-apache via port 8056, the db contents are stored within the ./db folder. This makes it very easy to migrate the database from one machine to another by just copying file contents.\n\n## Setup dnsmasq\n\n- `brew install dnsmasq`\n- `sudo mkdir /etc/resolver`\n- `sudo sh -c 'echo \"nameserver 127.0.0.1\" \u003e\u003e /etc/resolver/test'`\n- `sudo sh -c 'echo \"search_order 1\" \u003e\u003e /etc/resolver/test'`\n- `sudo brew services start dnsmasq`\n- `cd $(brew --prefix)`\n- `echo 'address=/test/127.0.0.1' \u003e\u003e etc/dnsmasq.conf`\n- `sudo brew services start dnsmasq`\n\n- Restart the machine 😒 (or maybe `dscacheutil -flushcache` works?)\n\n\u003e If there's a 5s delay before resolving local domains, add 127.0.0.1 as the first entry into the DNS Servers within your Network settings\n\nNow `[anydomain].test` will be forwarded to localhost.\n\n## Setup caddy\n\n- `brew install caddy`\n- create a `/usr/local/etc/Caddyfile` with these contents\n  ```\n  http://*.test {\n    reverse_proxy 127.0.0.1:8056\n  }\n  ```\n- `brew services start caddy`\n\nNow `[anydomain].test` will be forwarded to `[anydomain].test:8056` where the docker container above will be awaiting.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberndt%2Flocal-macos-php-development","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielberndt%2Flocal-macos-php-development","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberndt%2Flocal-macos-php-development/lists"}