2012年10月16日火曜日

Polka - Web DJをherokuにデプロイする

WebDJアプリpolkaが楽しそうだったので、herokuにデプロイしてみました。
と言ってもherokuで動作するように行った事は Procfilleの追加とpackage.jsonへの追記のみです。

インストールは以下のgistをご覧ください。
デプロイにherokuコマンドを使用しますので、別途準備してください。

#!/bin/sh
git clone https://github.com/masainox/polka.git -b 0.0.1-for-heroku
cd polka
heroku create --stack cedar
# deploy to heroku
git push heroku 0.0.1-for-heroku:master
# open app
heroku open

デプロイしたデモサイトはこちら http://polka-for-heroku-sample.herokuapp.com/です。
視聴者はhttp://polka-for-heroku-sample.herokuapp.com/playにアクセスして聞くことができます。
queueの作成はhttp://polka-for-heroku-sample.herokuapp.com/queueから行えます。

2012年4月20日金曜日

日本語環境のwordpressをherokuで動かす方法

2013年5月13日追記
MySQLを使用したバージョンの記事を新たに書きました。
http://blog.handswiz.com/2013/05/wordpress-heroku-with-cleardb.html

こちらからご覧ください。


こちらのwordpressをherokuで動かすプロジェクトを日本語環境で動かしてみました。
同梱した日本語資源はWordPress 日本語ローカルサイト で配布されているものです。
日本語資源を含めただけではプラグインの実行時にmbstring関数が必要と怒られて
WP Mutibyte Patch pluginが動きませんでしたので、
こちらのサイトを参考にphpの拡張機能も同梱しました。
インストールは以下のgistをご覧ください。 ruby と heroku gem が必要です。
#!/bin/sh
git clone git://github.com/masainox/wordpress-heroku.git -b language-ja
cd wordpress-heroku
heroku create -b git://github.com/iphoting/heroku-buildpack-php-tyler.git
heroku addons:add heroku-postgresql:dev
heroku pg:promote `heroku config | grep 'HEROKU_POSTGRESQL_' | sed -e "s/\:.*//"`
# create a new branch
git checkout -b production
# make the wp-config.php and commit wp-config.php
curl https://api.wordpress.org/secret-key/1.1/salt/ > salt.txt
cat wp-config-sample-first-part.txt salt.txt wp-config-sample-second-part.txt > wp-config.php
rm salt.txt
>.gitignore
git add wp-config.php
git commit -m "Initial WordPress commit"
# deploy to heroku
git push heroku production:master
デプロイしたデモサイトは こちらです。