First install Node.js. Then:
npm install -g bower
npm install -g phantomjs
#!/bin/bash | |
main() { | |
if [[ $(has_lvh_me) == 1 ]]; then | |
echo 'lvh.me is already specified in your hosts file' | |
else | |
add_lvh_me | |
echo 'lvh.me was added to your hosts file!' | |
fi | |
flush_dns_cache |
# Parse query name into theme and version variables (e.g. theme-name 1.0.0) | |
read theme version <<< "{query}" | |
# Create directory for new site | |
cd ~/Sites | |
mkdir $theme | |
cd $theme | |
# Download latest version of WordPress | |
wp core download |
Initializing... | |
Using remote CouchDB: http://127.0.0.1:5984 | |
Waiting for CouchDB [-*----] SUCCESS | |
WWW: http://127.0.0.1:6001 | |
Admin: http://127.0.0.1:6002 | |
Starting Plugin: 'hoodie-plugin-appconfig' | |
Starting Plugin: 'hoodie-plugin-email' | |
Starting Plugin: 'hoodie-plugin-users' | |
All plugins started. |
○ hoodie new appName -t "hoodiehq/hoodie-app-skeleton" | |
.d$b. .d$b. .d$$$$$$b. .d$$$$$$b. .d$$$$$$b. .d$b..d$$$$$$$$b. | |
$$$$$..$$$$$.$$$$$$$$$$$b .$$$$$$$$$$$b $$$$$$$$$$b $$$$$$$$$$$$$$$P' | |
$$$$$$$$$$$$d$$$$$$$$$$$$bd$$$$$$$$$$$$b$$$$$$$$$$$b$$$$$$$$$$$$$$$b. | |
$$$$$$$$$$$$Q$$$$$$$$$$$$PQ$$$$$$$$$$$$P$$$$$$$$$$$P$$$$$$$$$$$$$$$P' | |
$$$$$´`$$$$$'$$$$$$$$$$$$''$$$$$$$$$$$$'$$$$$$$$$$P $$$$$$$$$$$$$$$b. | |
'Q$P' 'Q$P' 'Q$$$$$$P' 'Q$$$$$$P' 'Q$$$$$$$P 'Q$P''Q$$$$$$$$P' | |
Version: 0.6.3 (node v0.12.15, npm 2.15.11, platform: darwin) |
# app/adapters/application.js | |
import DS from 'ember-data'; | |
import config from '../config/environment'; | |
export default DS.ActiveModelAdapter.extend({ | |
host: config.apiUrl | |
}); |
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/local/Cellar/node/0.10.5/bin/node', | |
1 verbose cli '/usr/local/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli '-g', | |
1 verbose cli 'ember-cli' ] | |
2 info using npm@1.2.18 | |
3 info using node@v0.10.5 | |
4 verbose read json /usr/local/share/npm/lib/package.json | |
5 verbose read json /usr/local/share/npm/lib/package.json |
env = require 'config/environment' | |
if env.isDevelopment() | |
window.App.ApplicationAdapter = DS.RESTAdapter.extend({ | |
host: 'http://localhost:3000' | |
}) | |
else if env.isTest() | |
window.App.ApplicationAdapter = DS.FixtureAdapter.extend({ | |
simulateRemoteResponse: false | |
}) |
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
Salient points for each file: