6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Redmine 4.0.5 を RedMica 1.0.0 に移行する

Last updated at Posted at 2019-11-04

●前提条件

  • OS:CentOS 7
  • Redmine
  • バージョン: 4.0.5
  • インストールディレクトリ: /opt/redmine
  • 動作パス: /redmine
  • アプリケーションサーバ: unicorn

1.ディレクトリ退避&作成

mv /opt/redmine /opt/redmine_org
mkdir /opt/redmine

※ディレクトリのオーナー/パーミッションは環境に合わせてください

2.ソース取得&設定ファイルの移行

git clone https://github.com/redmica/redmica.git /opt/redmine
cd /opt
cp redmine_org/config/unicorn.rb  redmine/config/
cp redmine_org/config/database.yml  redmine/config/
cp redmine_org/config/configuration.yml  redmine/config/
cp redmine_org/Gemfile.local redmine/
cp redmine_org/config.ru redmine/

※config.ru はサブディレクトリで動かすために編集
※unicorn.rb はunicornを動かすために追加
該当しない場合はどちらも無視してください

3.添付ファイルコピー

cp -ra redmine_org/files/*  redmine/files/

4.プラグインコピー

cp -ra redmine_org/plugins/* redmine/plugins/
cp -ra redmine_org/public/plugin_assets/*  redmine/public/plugin_assets/

5.テーマコピー

cp -ra redmine_org/public/themes/{47redmine_theme,axiom,farend_basic,redmine-theme-connpass,redmine_theme_kodomo,circle,farend_fancy,redmine-theme-flat-master,gitmike}  redmine/public/themes/

※ご自身の環境に合わせてください
※alternate/classic/bleuclair(redmine_theme_farend_bleuclair) はRedMicaに含まれるため、除いています。

6. manifest.jsの作成

mkdir -p redmine/app/assets/config
vim redmine/app/assets/config/manifest.js

以下の内容で作成

manifest.js
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css

7.gemインストール

cd redmine
bundle install --path vendor/bundle --without development test

8.master.key/credentials.yml.enc の作成

RAILS_ENV=production bundle exec rake secret

表示された値をコピーしておく。

EDITOR="vim" bundle exec rails credentials:edit

secret_key_base の値を上でコピーしたものに置き換える。

移行結果

image.png

6
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?