skip to content
barorin&?

Redmineの公式Docker Image初期設定(自分用メモ)

/ 2 min read

Table of Contents

はじめに

Redmineの公式Docker Imageを再ビルドしたときの自分用初期設定をメモっておきます。

設定

コンテナに入る

Terminal window
$ docker exec -it コンテナ名 /bin/bash

インストール

Terminal window
$ apt update
$ apt install vim cron -y

メール設定(SendGridを使う場合)

Terminal window
$ cp config/configuration.yml.example config/configuration.yml
$ vim config/configuration.yml
# 以下を追加
# default:
# email_delivery:
# delivery_method: :smtp
# smtp_settings:
# enable_starttls_auto: true
# address: "smtp.sendgrid.net"
# port: 587
# domain: "smtp.sendgrid.net"
# authentication: :plain
# user_name: "apikey"
# password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

キューアダプターの変更

sucker_punchインストール

Terminal window
$ bundle add sucker_punch

additional_environment.rbを作成

Terminal window
$ vim config/additional_environment.rb
# 以下を追加
# config.active_job.queue_adapter = :sucker_punch

cronでメールリマインダー設定

Terminal window
# cron設定
$ crontab -e
# 以下を追加。RUBYのバージョンは`ruby --version`で確認
# RUBY_VERSION=3.2.3
# BUNDLE_APP_CONFIG=/usr/local/bundle
# RUBY_MAJOR=3.2
# GEM_HOME=/usr/local/bundle
# PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# RAILS_ENV=production
# 30 6 * * * /bin/bash -l -c 'cd /usr/src/redmine && bundle exec rake redmine:send_reminders >> /usr/src/redmine/log/cron.log 2>&1
# cron起動
$ service start cron
# cronの起動確認
$ service cron status

テーマ変更

Terminal window
$ git clone https://github.com/farend/redmine_theme_farend_basic.git public/themes/farend_basic

プラグインインストール

redmine_extended_reminder

Terminal window
$ cd plugins
$ git clone https://github.com/vividtone/redmine_extended_reminder.git
$ bundle install

コンテナを抜けて再起動

Terminal window
$ exit
$ docker compose restart