##// END OF EJS Templates
Let the secret token be set in configuration.yml....
Jean-Philippe Lang -
r9384:bceaf8be9409
parent child
Show More
@@ -1,163 +1,172
1 # = Redmine configuration file
1 # = Redmine configuration file
2 #
2 #
3 # Each environment has it's own configuration options. If you are only
3 # Each environment has it's own configuration options. If you are only
4 # running in production, only the production block needs to be configured.
4 # running in production, only the production block needs to be configured.
5 # Environment specific configuration options override the default ones.
5 # Environment specific configuration options override the default ones.
6 #
6 #
7 # Note that this file needs to be a valid YAML file.
7 # Note that this file needs to be a valid YAML file.
8 # DO NOT USE TABS! Use 2 spaces instead of tabs for identation.
8 # DO NOT USE TABS! Use 2 spaces instead of tabs for identation.
9 #
9 #
10 # == Outgoing email settings (email_delivery setting)
10 # == Outgoing email settings (email_delivery setting)
11 #
11 #
12 # === Common configurations
12 # === Common configurations
13 #
13 #
14 # ==== Sendmail command
14 # ==== Sendmail command
15 #
15 #
16 # production:
16 # production:
17 # email_delivery:
17 # email_delivery:
18 # delivery_method: :sendmail
18 # delivery_method: :sendmail
19 #
19 #
20 # ==== Simple SMTP server at localhost
20 # ==== Simple SMTP server at localhost
21 #
21 #
22 # production:
22 # production:
23 # email_delivery:
23 # email_delivery:
24 # delivery_method: :smtp
24 # delivery_method: :smtp
25 # smtp_settings:
25 # smtp_settings:
26 # address: "localhost"
26 # address: "localhost"
27 # port: 25
27 # port: 25
28 #
28 #
29 # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
29 # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
30 #
30 #
31 # production:
31 # production:
32 # email_delivery:
32 # email_delivery:
33 # delivery_method: :smtp
33 # delivery_method: :smtp
34 # smtp_settings:
34 # smtp_settings:
35 # address: "example.com"
35 # address: "example.com"
36 # port: 25
36 # port: 25
37 # authentication: :login
37 # authentication: :login
38 # domain: 'foo.com'
38 # domain: 'foo.com'
39 # user_name: 'myaccount'
39 # user_name: 'myaccount'
40 # password: 'password'
40 # password: 'password'
41 #
41 #
42 # ==== SMTP server at example.com using PLAIN authentication
42 # ==== SMTP server at example.com using PLAIN authentication
43 #
43 #
44 # production:
44 # production:
45 # email_delivery:
45 # email_delivery:
46 # delivery_method: :smtp
46 # delivery_method: :smtp
47 # smtp_settings:
47 # smtp_settings:
48 # address: "example.com"
48 # address: "example.com"
49 # port: 25
49 # port: 25
50 # authentication: :plain
50 # authentication: :plain
51 # domain: 'example.com'
51 # domain: 'example.com'
52 # user_name: 'myaccount'
52 # user_name: 'myaccount'
53 # password: 'password'
53 # password: 'password'
54 #
54 #
55 # ==== SMTP server at using TLS (GMail)
55 # ==== SMTP server at using TLS (GMail)
56 #
56 #
57 # This might require some additional configuration. See the guides at:
57 # This might require some additional configuration. See the guides at:
58 # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
58 # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
59 #
59 #
60 # production:
60 # production:
61 # email_delivery:
61 # email_delivery:
62 # delivery_method: :smtp
62 # delivery_method: :smtp
63 # smtp_settings:
63 # smtp_settings:
64 # tls: true
64 # tls: true
65 # enable_starttls_auto: true
65 # enable_starttls_auto: true
66 # address: "smtp.gmail.com"
66 # address: "smtp.gmail.com"
67 # port: 587
67 # port: 587
68 # domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
68 # domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
69 # authentication: :plain
69 # authentication: :plain
70 # user_name: "your_email@gmail.com"
70 # user_name: "your_email@gmail.com"
71 # password: "your_password"
71 # password: "your_password"
72 #
72 #
73 #
73 #
74 # === More configuration options
74 # === More configuration options
75 #
75 #
76 # See the "Configuration options" at the following website for a list of the
76 # See the "Configuration options" at the following website for a list of the
77 # full options allowed:
77 # full options allowed:
78 #
78 #
79 # http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
79 # http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
80
80
81
81
82 # default configuration options for all environments
82 # default configuration options for all environments
83 default:
83 default:
84 # Outgoing emails configuration (see examples above)
84 # Outgoing emails configuration (see examples above)
85 email_delivery:
85 email_delivery:
86 delivery_method: :smtp
86 delivery_method: :smtp
87 smtp_settings:
87 smtp_settings:
88 address: smtp.example.net
88 address: smtp.example.net
89 port: 25
89 port: 25
90 domain: example.net
90 domain: example.net
91 authentication: :login
91 authentication: :login
92 user_name: "redmine@example.net"
92 user_name: "redmine@example.net"
93 password: "redmine"
93 password: "redmine"
94
94
95 # Absolute path to the directory where attachments are stored.
95 # Absolute path to the directory where attachments are stored.
96 # The default is the 'files' directory in your Redmine instance.
96 # The default is the 'files' directory in your Redmine instance.
97 # Your Redmine instance needs to have write permission on this
97 # Your Redmine instance needs to have write permission on this
98 # directory.
98 # directory.
99 # Examples:
99 # Examples:
100 # attachments_storage_path: /var/redmine/files
100 # attachments_storage_path: /var/redmine/files
101 # attachments_storage_path: D:/redmine/files
101 # attachments_storage_path: D:/redmine/files
102 attachments_storage_path:
102 attachments_storage_path:
103
103
104 # Configuration of the autologin cookie.
104 # Configuration of the autologin cookie.
105 # autologin_cookie_name: the name of the cookie (default: autologin)
105 # autologin_cookie_name: the name of the cookie (default: autologin)
106 # autologin_cookie_path: the cookie path (default: /)
106 # autologin_cookie_path: the cookie path (default: /)
107 # autologin_cookie_secure: true sets the cookie secure flag (default: false)
107 # autologin_cookie_secure: true sets the cookie secure flag (default: false)
108 autologin_cookie_name:
108 autologin_cookie_name:
109 autologin_cookie_path:
109 autologin_cookie_path:
110 autologin_cookie_secure:
110 autologin_cookie_secure:
111
111
112 # Configuration of SCM executable command.
112 # Configuration of SCM executable command.
113 #
113 #
114 # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
114 # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
115 # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
115 # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
116 #
116 #
117 # On Windows + JRuby 1.6.2, path which contains spaces does not work.
117 # On Windows + JRuby 1.6.2, path which contains spaces does not work.
118 # For example, "C:\Program Files\TortoiseHg\hg.exe".
118 # For example, "C:\Program Files\TortoiseHg\hg.exe".
119 # If you want to this feature, you need to install to the path which does not contains spaces.
119 # If you want to this feature, you need to install to the path which does not contains spaces.
120 # For example, "C:\TortoiseHg\hg.exe".
120 # For example, "C:\TortoiseHg\hg.exe".
121 #
121 #
122 # Examples:
122 # Examples:
123 # scm_subversion_command: svn # (default: svn)
123 # scm_subversion_command: svn # (default: svn)
124 # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
124 # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
125 # scm_git_command: /usr/local/bin/git # (default: git)
125 # scm_git_command: /usr/local/bin/git # (default: git)
126 # scm_cvs_command: cvs # (default: cvs)
126 # scm_cvs_command: cvs # (default: cvs)
127 # scm_bazaar_command: bzr.exe # (default: bzr)
127 # scm_bazaar_command: bzr.exe # (default: bzr)
128 # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
128 # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
129 #
129 #
130 scm_subversion_command:
130 scm_subversion_command:
131 scm_mercurial_command:
131 scm_mercurial_command:
132 scm_git_command:
132 scm_git_command:
133 scm_cvs_command:
133 scm_cvs_command:
134 scm_bazaar_command:
134 scm_bazaar_command:
135 scm_darcs_command:
135 scm_darcs_command:
136
136
137 # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
137 # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
138 # If you don't want to enable data encryption, just leave it blank.
138 # If you don't want to enable data encryption, just leave it blank.
139 # WARNING: losing/changing this key will make encrypted data unreadable.
139 # WARNING: losing/changing this key will make encrypted data unreadable.
140 #
140 #
141 # If you want to encrypt existing passwords in your database:
141 # If you want to encrypt existing passwords in your database:
142 # * set the cipher key here in your configuration file
142 # * set the cipher key here in your configuration file
143 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
143 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
144 #
144 #
145 # If you have encrypted data and want to change this key, you have to:
145 # If you have encrypted data and want to change this key, you have to:
146 # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
146 # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
147 # * change the cipher key here in your configuration file
147 # * change the cipher key here in your configuration file
148 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
148 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
149 database_cipher_key:
149 database_cipher_key:
150
150
151 # Set this to false to disable plugins' assets mirroring on startup.
151 # Set this to false to disable plugins' assets mirroring on startup.
152 # You can use `rake redmine:plugins:assets` to manually mirror assets
152 # You can use `rake redmine:plugins:assets` to manually mirror assets
153 # to public/plugin_assets when you install/upgrade a Redmine plugin.
153 # to public/plugin_assets when you install/upgrade a Redmine plugin.
154 #
154 #
155 #mirror_plugins_assets_on_startup: false
155 #mirror_plugins_assets_on_startup: false
156
156
157 # Your secret key for verifying cookie session data integrity. If you
158 # change this key, all old sessions will become invalid! Make sure the
159 # secret is at least 30 characters and all random, no regular words or
160 # you'll be exposed to dictionary attacks.
161 #
162 # If you have a load-balancing Redmine cluster, you have to use the
163 # same secret token on each machine.
164 #secret_token: 'change it to a long random string'
165
157 # specific configuration options for production environment
166 # specific configuration options for production environment
158 # that overrides the default ones
167 # that overrides the default ones
159 production:
168 production:
160
169
161 # specific configuration options for development environment
170 # specific configuration options for development environment
162 # that overrides the default ones
171 # that overrides the default ones
163 development:
172 development:
@@ -1,10 +1,16
1 I18n.default_locale = 'en'
1 I18n.default_locale = 'en'
2 # Adds fallback to default locale for untranslated strings
2 # Adds fallback to default locale for untranslated strings
3 I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
3 I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
4
4
5 require 'redmine'
5 require 'redmine'
6
6
7 # Load the secret token from the Redmine configuration file
8 secret = Redmine::Configuration['secret_token']
9 if secret.present?
10 RedmineApp::Application.config.secret_token = secret
11 end
12
7 Redmine::Plugin.load
13 Redmine::Plugin.load
8 unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
14 unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
9 Redmine::Plugin.mirror_assets
15 Redmine::Plugin.mirror_assets
10 end
16 end
General Comments 0
You need to be logged in to leave comments. Login now