perform many deploys to staging, prod, ... II. Dependencies Your application explicitly declares userland and platform deps. III. Configuration Read from $_ENV: API keys, database credentials, SMTP hosts, ... XI. Logging file_put_contents("php://stderr", "Yay log");
similar as possible. SQLite ≠ MySQL Apache ≠ Nginx File based sessions ≠ Redis based sessions If apt-‐get or brew don't get the job done on your box: Vagrant is always your friend!
processes. $ heroku run "php app/console doctrine:migrations:migrate" Running `php app/console…` attached to terminal... up, run.4062 Migrating up to 20100416130452 from 0 >> migrating 20100416130452 -‐> CREATE TABLE users (username VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL) ENGINE = InnoDB >> migrated They run in isolation, just like all other "dynos". With the same release: same code, same config!
addons:add heroku-‐postgresql:standard-‐0 \ -‐-‐fork HEROKU_POSTGRESQL_CHARCOAL_URL Adding heroku-‐postgresql:standard-‐0 on app... done, v7 ($50/mo) Attached as HEROKU_POSTGRESQL_SILVER_URL Database will become available after it completes forking Use `heroku pg:wait` to track status $ heroku pg:wait Waiting for database HEROKU_POSTGRESQL_SILVER_URL... available
\ -‐-‐follow HEROKU_POSTGRESQL_CHARCOAL_URL Adding heroku-‐postgresql:standard-‐0 to foo... done, v8 ($50/mo) Attached as HEROKU_POSTGRESQL_RED $ heroku pg:unfollow HEROKU_POSTGRESQL_WHITE_URL ! HEROKU_POSTGRESQL_WHITE will become writable and no longer ! follow HEROKU_POSTGRESQL_CHARCOAL. This cannot be undone. ! WARNING: Potentially Destructive Action ! This command will affect the app: foo ! To proceed, type "foo" or re-‐run this command with -‐-‐ confirm foo > foo Unfollowing... done
happened. $ heroku addons:add heroku-‐postgresql:standard-‐0 \ -‐-‐rollback HEROKU_POSTGRESQL_RED_URL -‐-‐by '1 hour' Adding heroku-‐postgresql:standard-‐0 on foo... done, v9 ($50/mo) Attached as HEROKU_POSTGRESQL_YELLOW_URL Database will become available after it completes rolling back to 2015-‐01-‐16 09:02:14 +0000 (01:00:00 ago) Use `heroku pg:wait` to track status. Use `heroku addons:docs heroku-‐postgresql` to view documentation.