Skip to content

bangpound/webdev-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!&# webdev workspace

This is the web development environment used by bangpound on a Mac. It can probably work with few modifications on other environments.

Principles

  • Run servers on virtual machines.
  • Avoid dependencies where possible in the host environment.
  • Avoid editing configuration files at all.
  • Prefer editing configuration files once instead of repeatedly.
  • Be platform agnostic (so long as the platform is PHP).

Installation for Mac environments

  1. Install homebrew and its dependencies.

  2. Install VMWare Fusion or VirtualBox.

  3. Install Vagrant and the VMWare Fusion provider plugin if applicable.

  4. Tap the PHP homebrew repository.

     brew tap josegonzalez/php
    
  5. Use homebrew to install dnsmasq.

     brew install dnsmasq
    
  6. Configure dnsmasq. This sets OpenDNS as the DNS server.

     cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
     cat >> /usr/local/etc/dnsmasq.conf
     address=/.5/127.0.0.1
     address=/.6/127.0.0.1
     address=/.7/127.0.0.1
     address=/.8/127.0.0.1
     address=/.localhost/127.0.0.1
     address=/.symfony/127.0.0.1
     resolv-file=/etc/resolv.dnsmasq.conf
     ^D
     sudo cat > /etc/resolv.dnsmasq.conf
     nameserver 208.67.222.222
     nameserver 208.67.220.220
     ^D
    
  7. Clone this repository in your home directory so that its path is ~/workspace.

     cd ~
     git clone git@github.com:bangpound/webdev-workspace.git workspace
    
  8. Also include MySQL client, PHP, Composer, drush. You'll probably need them.

     brew install mysql --client-only
     brew install drush
     brew install composer
     brew install php54 --without-apache
    
  9. Run the Vagrant VM.

     vagrant up
    
  10. Configure the local connections to MySQL.

    cat > /usr/local/etc/my.cnf
    [client]
    host=127.0.0.1
    port=3306
    password="vagrant"
    
  11. Get to work.

    cd ~
    mysqladmin create drupal
    vagrant ssh
    cd /vagrant
    drush dl drupal-7.x drupal-7
    cd drupal-7/sites
    cp -R default my-new-site.7
    logout
    open http://my-new-site.7
    

Credits

This environment is influenced by CivicActions and Drubuntu. Puppet scripts were poached from FunnyMonkey.

About

webdev environment: configuration and workspace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published