Help us understand the problem. What is going on with this article?

Redmine 4.0.5 を RedMica 1.0.0 に移行する

●前提条件

  • 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

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away