4
6

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 3 years have passed since last update.

Redmine(スクラム、アジャイルプラグイン)の環境構築備忘録

Last updated at Posted at 2020-10-26

Redmineの環境を作成する機会があったのでメモ

  • Dockerを使用
  • https化はLet’s Encrypt(https-portal)を使用
  • Redmineのバージョンは最新バージョン(4.1.1)
  • MySQLを使用

docker-compose(パスワードやドメイン名は適宜設定してください)

docker-compose.yml
version: '3'
services:
  redmine:
    image: redmine:4.1.1
    restart: always
    container_name: redmine_container
    environment:
      REDMINE_DB_MYSQL: mysql
      REDMINE_DB_DATABASE: redmine
      REDMINE_DB_USERNAME: redmine
      REDMINE_DB_PASSWORD: redmine
      REDMINE_DB_ENCODING: utf8mb4
      VIRTUAL_HOST: <設定したいドメイン名>
    expose:
      - 3000
    volumes:
      - ./redmine/files:/usr/src/redmine/files
      - ./redmine/log:/usr/src/redmine/log
      - ./redmine/plugins:/usr/src/redmine/plugins
      - ./redmine/public/themes:/usr/src/redmine/public/themes
    depends_on:
      - mysql
  mysql:
    image: mysql:5.7
    container_name: mysql
    restart: always
    environment:
      TZ: Asia/Tokyo
      MYSQL_ROOT_PASSWORD: redmine
      MYSQL_DATABASE: redmine
      MYSQL_USER: redmine
      MYSQL_PASSWORD: redmine
    volumes:
      - ./mysql-data:/var/lib/mysql
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
  https-portal:
    image: steveltn/https-portal:latest
    ports:
      - '80:80'
      - '443:443'
    links:
      - redmine
    restart: always
    environment:
      DOMAINS: '<設定したいドメイン名> -> http://redmine_container:3000'
      STAGE: 'production'
      #FORCE_RENEW: 'true'
    volumes:
      - ./certs:/var/lib/https-portal

https-portalとは??

STAGE

  • production...SSL証明書を取得しに行く
  • local...オレオレ証明書を設定

FORCE_RENEW

  • 基本使わない
  • 強制的に証明書を発行する
  • Let’s Encryptには制限があるので注意

volumes

  • 証明書を永続化するために、/var/lib/https-portalをボリュームに設定する

Scrum Redmine pluginのインストール

1. Redmineのpluginディレクトリにプラグインを格納する

2. Redmineのコンテナ内に入り以下のコマンドを実行

$ RAILS_ENV=production bundle exec rake redmine:plugins:migrate

3. Redmine上でプラグインの設定

参考

Redmine Agile plugin (Light version)のインストール

1. 公式サイトから無料のLightプランをダウンロード

2. Redmineのpluginディレクトリにプラグインを格納する

  • サンプルのdocker-compose.ymlのpluginディレクトリは./redmine/plugins

3. Redmineのコンテナ内に入り以下のコマンドを実行

$ bundle install --without development test --no-deployment
$ bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production

参考

インストールが完了したらRedmineのプラグインページが表示される

image.png

4
6
0

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
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?