Skip to content

Instantly share code, notes, and snippets.

@haggen
Created June 9, 2017 03:14
Show Gist options
  • Save haggen/9395ce37d18205e7a4a368b68685169c to your computer and use it in GitHub Desktop.
Save haggen/9395ce37d18205e7a4a368b68685169c to your computer and use it in GitHub Desktop.
Friendly development environment on macOS with Docker for Mac, dnsmasq and caddy.

On a fresh macOS installation:

  1. Install Xcode plus command tools - run git with Xcode in place (tested with Xcode 9 Beta on 10.13).
  2. Install homebrew.
  3. Install dnsmasq and configure it respond for .dev.
  4. Install caddy with brew install caddy.
  5. Download Caddyfile move it to ~/.
  6. Download com.corenzan.caddy.plist and move it to /Library/LaunchDaemons/.
http://test.dev {
proxy / 127.0.0.1:3000
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.corenzan.caddy.plist</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>/usr/local/bin/caddy</string>
<string>~/Caddyfile</string>
</array>
<key>Debug</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>WatchPaths</key>
<array>
<string>~/Caddyfile</string>
</array>
<key>Sockets</key>
<dict>
<key>Listener</key>
<dict>
<key>SockServiceMode</key>
<string>http</string>
<key>SockType</key>
<string>stream</string>
<key>SockFamily</key>
<string>IPv4</string>
</dict>
</dict>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment