主要参考 https://blog.csdn.net/zssureqh/article/details/51816892?utm_source=app
本安装不依赖除Docker, Docker-compose外的其他应用。
大坑:发送邮箱账户要和configuration.yml配置一致。
Redmine中:管理->配置->邮件通知->邮件发件人地址:填入/xxx/bitnami-redmine/database/redmine/**/configuration.yml配置的邮箱,先点保存(不然还是以redmine@example.net邮箱发送,这里被坑过好多次),然后再发送测试邮件。
(docker-compose启动后需手动修改此配置文件,并不能完全自动配置准确,经测试,126邮箱不稳定,sina可用)
(需注意空格和tab键的区别,yml文件必须要用空格对齐)
# default configuration options for all environments
default:
# Outgoing emails configuration
# See the examples below and the Rails guide for more configuration options:
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
ssl: true
address: "smtp.sina.com"
port: 465
domain: "sina.com"
authentication: :login
user_name: "xx@sina.com"
password: "***" # 此处为授权码,非登录密码
docker-compose 配置文件
修改了docker-compose配置文件的一些参数
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:latest'
restart: always
environment:
#- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_ROOT_PASSWORD=root-password
- MARIADB_PASSWORD=password
- MARIADB_USER=bn_redmine
- MARIADB_DATABASE=bitnami_redmine
volumes:
- 'mariadb_data:/bitnami'
redmine:
image: 'bitnami/redmine:latest'
ports:
- '9001:3000'
volumes:
- 'redmine_data:/bitnami'
depends_on:
- mariadb
environment:
- REDMINE_USERNAME=admin #redmine默认管理员用户
- REDMINE_PASSWORD=admin #redmine默认管理员密码
- SMTP_ENABLED=true
- SMTP_METHOD=smtp
- SMTP_HOST=smtp.sina.com
- SMTP_DOMAIN=sina.com
- SMTP_PORT=465
- SMTP_USER=xxx@sina.com
- SMTP_PASSWORD=xxxx#redmine邮件服务器的密码
- SMTP_STARTTLS=true
- SMTP_TLS=true
- SMTP_OPENSSL_VERIFY_MODE="none"
- SMTP_AUTHENTICATION=:login
- REDMINE_DB_MYSQL=mariadb
- REDMINE_DB_USERNAME=bn_redmine
- REDMINE_DB_PASSWORD=password
volumes:
mariadb_data:
driver: local
driver_opts:
type: 'nfs' # 根据数据驱动器文件系统格式修改
device: '/xxx/bitnami-redmine/database/mariadb/'
o: bind
redmine_data:
driver: local
driver_opts:
type: 'nfs' # 根据数据驱动器文件系统格式修改
device: '/xxx/bitnami-redmine/database/redmine/'
o: bind