- Intercom can be initialised with various ways For visitors
window.intercomSettings = {
app_id: YOUR_APP_ID
}
For Logged in users
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
I tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.
"not a top priority, but by Spring :)"
As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503 errors, so decided to use the following hack (code below) until the feature is officially implemented.
| # /var/discourse# ./launcher enter app | |
| # RAILS_ENV=production bundle exec rake -T | |
| rake about # List versions of all Rails frameworks and the environment | |
| rake add_topic_to_quotes # Add the topic to quotes | |
| rake admin:create # Creates a forum administrator | |
| rake admin:invite[email] # invite an admin to this discourse instance | |
| rake api_key:get # generate api key if missing, return existing if already there | |
| rake assets:clean[keep] # Remove old compiled assets | |
| rake assets:clobber # Remove compiled assets |
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
| # ---------------------- | |
| # installing dnsmasq and enable daemon | |
| # ---------------------- | |
| brew install dnsmasq | |
| sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
| # ---------------------- | |
| # adding resolver for vbox domain | |
| # ---------------------- | |
| [ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
| sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/vbox' |
| DROP TABLE IF EXISTS time_dimension; | |
| CREATE TABLE time_dimension ( | |
| id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
| db_date DATE NOT NULL, | |
| year INTEGER NOT NULL, | |
| month INTEGER NOT NULL, -- 1 to 12 | |
| day INTEGER NOT NULL, -- 1 to 31 | |
| quarter INTEGER NOT NULL, -- 1 to 4 | |
| week INTEGER NOT NULL, -- 1 to 52/53 | |
| day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |