Redmineの公式Docker Image初期設定(自分用メモ)
/ 2 min read
Table of Contents
はじめに
Redmineの公式Docker Imageを再ビルドしたときの自分用初期設定をメモっておきます。
設定
コンテナに入る
$ docker exec -it コンテナ名 /bin/bash
インストール
$ apt update$ apt install vim cron -y
メール設定(SendGridを使う場合)
$ 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インストール
$ bundle add sucker_punch
additional_environment.rbを作成
$ vim config/additional_environment.rb# 以下を追加# config.active_job.queue_adapter = :sucker_punch
cronでメールリマインダー設定
# 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
テーマ変更
$ git clone https://github.com/farend/redmine_theme_farend_basic.git public/themes/farend_basic
プラグインインストール
redmine_extended_reminder
$ cd plugins$ git clone https://github.com/vividtone/redmine_extended_reminder.git$ bundle install
コンテナを抜けて再起動
$ exit$ docker compose restart