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_punchadditional_environment.rbを作成
$ vim config/additional_environment.rb# 以下を追加# config.active_job.queue_adapter = :sucker_punchcronでメールリマインダー設定
# 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