dotCloudにRedmineをインストール

インストールできた。


インストール方法1(olddocs)インストール方法2


$ mkdir dotcloud
$ cd dotcloud
$ wget http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz
$ tar zxvf redmine-1.2.1.tar.gz
$ cd redmine-1.2.1


$ gedit dotcould.yml (新規作成)参考

www:
  type: ruby
  approot: redmine-1.2.1
  config:
    ruby-version: ree

db:
  type: mysql

$ dotcloud create redmine
$ dotcloud push redmine
$ dotcloud info redmine.db
$ dotcloud run redmine.db -- mysql -u root -p
(mysqlのrootのパスワードを入力)
mysql> CREATE USER 'redmine' IDENTIFIED BY 'password(任意)';
mysql> CREATE DATABASE redmine;
mysql> GRANT ALL ON redmine.* TO 'redmine'@'%';
mysql> FLUSH PRIVILEGES;
(ctrl+Dで離脱)


redmine-1.2.1/config/environment.rb ファイル修正1

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

の下に

if Gem::VERSION >= "1.3.6"
    module Rails
        class GemDependency
            def requirement
                r = super
                (r == Gem::Requirement.default) ? nil : r
            end
        end
    end
end

を追加します。


redmine-1.2.1/config/environment.rb ファイル修正2 参考 secretPassは任意のパスワードに変更します。

# 末尾から一行上に下記内容を記載いたします。
  config.action_controller.session = { :key => "_myapp_session", :secret => "secretPass" }

redmine-1.2.1/config/boot.rb の1行目に下記を追加

require 'thread'


redmine-1.2.1/config/database.yml の作成

production:
  adapter: mysql
  database: redmine
  host: redmine-*******.dotcloud.com  ($ dotcloud info redmine.db で確認)
  port: *****  ($ dotcloud info redmine.db で確認)
  username: redmine
  password: ********
  encoding: utf8

redmine-1.2.1/postinstall の作成

#!/bin/sh
[ -d ~/data/files ] || mkdir -p ~/data/files
[ -L ~/current/files ] || {
    rm -rf ~/current/files
    ln -s ~/data/files ~/current/files
}
rake generate_session_store

$ chmod +x redmine-1.2.1/postinstall


$ dotcloud push redmine


$dotcloud ssh redmine.www

$ cd current
(失敗するので、$ mv current current.bak して、$ ln -s rsync***** currentします)
$ cd current


$ rake db:migrate
$ gem install -v=0.4.2 i18n
$ gem install -v=1.1.0 rack
$ rake db:migrateした時にA key is required エラーの対処方法
$ gem install mysql
$ rake redmine:load_default_data
$ exit


$ dotcloud info redmine.db でアドレスを確認して開きます。
admin admin でログインして、adminのパスワードを変更します。


参考


Redmine
参考1参考2