Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lightweight development (Lightning talk)

387 views

Published on

The quest for a lightweight development environment for local PHP development.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Lightweight development (Lightning talk)

  1. 1. Lightweight Development
  2. 2. Roger López @zroger
  3. 3. I develop locally.
  4. 4. The old ways...
  5. 5. MAMP
  6. 6. System-wide services
  7. 7. Newer ways
  8. 8. Vagrant
  9. 9. Dev-friendly hosting
  10. 10. drush runserver
  11. 11. Everything to the foreground!
  12. 12. My Ideal Solution • Runs in the foreground. Start, stop, go away. • Easily use different configurations per project. • Uses easily installable services (homebrew).
  13. 13. httpd -d . -f httpd.conf -DFOREGROUND
  14. 14. minimal httpd.conf https://gist.github.com/zroger/5990997 76 lines, heavily commented
  15. 15. # # Minimal httpd.conf for running apache in the foreground for local php # development. # # Setup: # 1. Place this file in the root of your project. # 2. Make sure the ./tmp directory exists (for the pid and lock files). # 3. Update the DocumentRoot and Directory directives with the relative path to # your project's document root. # # Usage: # httpd -d . -f httpd.conf -DFOREGROUND # # Relative file paths in this file are relative to the server root, which is # assumed to be set from the command line option, as in the about usage. #   ServerName localhost Listen 8080 PidFile tmp/httpd.pid LockFile tmp/accept.lock
  16. 16. Automate it.
  17. 17. foreman manages Procfile-based applications
  18. 18. Procfile web: httpd -d . -f httpd.conf -DFOREGROUND
  19. 19. Procfile web: httpd -d . -f httpd.conf -DFOREGROUND db: mysqld --log-error=/dev/stdout cache: memcached -v search: solr ./example/solr/
  20. 20. Roger López @zroger
  21. 21. Phase2Technology.com

×