├── .gitignore
├── bin
├── manage_redmine.sh
└── start_redmine.sh
├── include_files
├── redmine_apache.conf
├── config
│ ├── database.yml
│ ├── settings.yml
│ └── configuration.yml
└── start.sh
├── Dockerfile-2.5
├── Dockerfile-2.6
├── Dockerfile-3.1
├── Dockerfile-3.2
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 |
--------------------------------------------------------------------------------
/bin/manage_redmine.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # A script that launches a shell inside a Redmine session.
4 | # This is useful for running database upgrades etc.
5 | sudo docker run --rm \
6 | -v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock \
7 | -v /usr/local/redmine-store/plugins:/usr/local/redmine/plugins \
8 | -v /usr/local/redmine-store/config/database.yml:/usr/local/redmine/config/database.yml:ro \
9 | -v /usr/local/redmine-store/config/configuration.yml:/usr/local/redmine/config/configuration.yml:ro \
10 | -v /usr/local/redmine-store/files:/usr/local/redmine/files \
11 | -e "RUN_MIGRATION=True" \
12 | -e "INSTALL_BUNDLE=True" \
13 | -i -t vpetersson/redmine /bin/bash
14 |
--------------------------------------------------------------------------------
/bin/start_redmine.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # An example on how to run Redmine
4 | sudo docker run -d \
5 | -v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock \
6 | -v /usr/local/redmine-store/config/database.yml:/usr/local/redmine/config/database.yml:ro \
7 | -v /usr/local/redmine-store/config/configuration.yml:/usr/local/redmine/config/configuration.yml:ro \
8 | -v /usr/local/redmine-store/files:/usr/local/redmine/files \
9 | -v /usr/local/redmine-store/plugins:/usr/local/redmine/plugins \
10 | -v /usr/local/redmine-store/themes:/usr/local/redmine/public/themes \
11 | -p 3030:3000 \
12 | #-v /usr/local/git/repositories/:/usr/local/git/repositories/:ro \
13 | #-e "ENABLE_GIT_USER=True" \
14 | --name redmine \
15 | -i -t vpetersson/redmine
16 |
--------------------------------------------------------------------------------
/include_files/redmine_apache.conf:
--------------------------------------------------------------------------------
1 | KeepAlive On
2 | MaxKeepAliveRequests 100
3 | KeepAliveTimeout 5
4 | User www-data
5 | Group www-data
6 | HostnameLookups Off
7 | ErrorLog /var/log/apache2/error.log
8 | LogLevel warn
9 | IncludeOptional mods-enabled/*.load
10 | IncludeOptional mods-enabled/*.conf
11 |
12 |
13 | Require all denied
14 |
15 |
16 | IncludeOptional conf-enabled/*.conf
17 |
18 | Listen 0.0.0.0:3000
19 |
20 | # Redmine
21 |
22 | DocumentRoot /usr/local/redmine/public
23 |
24 | # Specify runtime environment
25 | RailsEnv production
26 |
27 | # Specify runtime user
28 | PassengerDefaultUser www-data
29 |
30 |
31 |
32 | # This relaxes Apache security settings.
33 | AllowOverride all
34 |
35 | # MultiViews must be turned off.
36 | Options -MultiViews
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Dockerfile-2.5:
--------------------------------------------------------------------------------
1 | # Dockerized Redmine
2 |
3 | FROM ubuntu:14.04
4 | MAINTAINER Viktor Petersson
5 |
6 | # Install required packages
7 | RUN apt-get -qq update && \
8 | apt-get -qq install -y wget ruby ruby-dev build-essential imagemagick libmagickwand-dev libmysqlclient-dev apache2 apt-transport-https ca-certificates git-core && \
9 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 && \
10 | echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" > /etc/apt/sources.list.d/passenger.list && \
11 | apt-get -qq update && \
12 | apt-get -qq install -y libapache2-mod-passenger && \
13 | apt-get clean
14 |
15 | # Fetch the latest redmine repo (and delete `.git`) to save space)
16 | ENV BRANCH 2.5-stable
17 | RUN cd /usr/local && \
18 | git clone https://github.com/redmine/redmine.git && \
19 | cd redmine && \
20 | git checkout $BRANCH && \
21 | rm -rf .git
22 |
23 | RUN touch /usr/local/redmine/log/production.log
24 | WORKDIR /usr/local/redmine
25 |
26 | # Install dependencies
27 | RUN gem install -q bundler mysql2 && \
28 | bundle install --without development test
29 |
30 | # Add files and clean up unnecessary files
31 | ADD include_files/redmine_apache.conf /etc/apache2/redmine_apache.conf
32 | ADD include_files/start.sh /start.sh
33 |
34 | EXPOSE 3000
35 |
36 | CMD /start.sh
37 |
--------------------------------------------------------------------------------
/Dockerfile-2.6:
--------------------------------------------------------------------------------
1 | # Dockerized Redmine
2 |
3 | FROM ubuntu:14.04
4 | MAINTAINER Viktor Petersson
5 |
6 | # Install required packages
7 | RUN apt-get -qq update && \
8 | apt-get -qq install -y wget ruby ruby-dev build-essential imagemagick libmagickwand-dev libmysqlclient-dev apache2 apt-transport-https ca-certificates git-core subversion && \
9 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 && \
10 | echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" > /etc/apt/sources.list.d/passenger.list && \
11 | apt-get -qq update && \
12 | apt-get -qq install -y libapache2-mod-passenger && \
13 | apt-get clean
14 |
15 | # Fetch the latest redmine repo (and delete `.git`) to save space)
16 | ENV BRANCH 2.6-stable
17 | RUN cd /usr/local && \
18 | git clone https://github.com/redmine/redmine.git && \
19 | cd redmine && \
20 | git checkout $BRANCH && \
21 | rm -rf .git
22 |
23 | RUN touch /usr/local/redmine/log/production.log
24 | WORKDIR /usr/local/redmine
25 |
26 | # Install dependencies
27 | RUN gem install -q bundler mysql2 && \
28 | bundle install --without development test
29 |
30 | # Add files and clean up unnecessary files
31 | ADD include_files/redmine_apache.conf /etc/apache2/redmine_apache.conf
32 | ADD include_files/start.sh /start.sh
33 |
34 | EXPOSE 3000
35 |
36 | CMD /start.sh
37 |
--------------------------------------------------------------------------------
/Dockerfile-3.1:
--------------------------------------------------------------------------------
1 | # Dockerized Redmine
2 |
3 | FROM ubuntu:14.04
4 | MAINTAINER Viktor Petersson
5 |
6 | # Install required packages
7 | RUN apt-get -qq update && \
8 | apt-get -qq install -y wget ruby ruby-dev build-essential imagemagick libmagickwand-dev libmysqlclient-dev apache2 apt-transport-https ca-certificates git-core subversion && \
9 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 && \
10 | echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" > /etc/apt/sources.list.d/passenger.list && \
11 | apt-get -qq update && \
12 | apt-get -qq install -y libapache2-mod-passenger && \
13 | apt-get clean
14 |
15 | # Fetch the latest redmine repo (and delete `.git`) to save space)
16 | ENV BRANCH 3.1-stable
17 | RUN cd /usr/local && \
18 | git clone https://github.com/redmine/redmine.git && \
19 | cd redmine && \
20 | git checkout $BRANCH && \
21 | rm -rf .git
22 |
23 | RUN touch /usr/local/redmine/log/production.log
24 | WORKDIR /usr/local/redmine
25 |
26 | # Install dependencies
27 | RUN gem install -q bundler mysql2 && \
28 | bundle install --without development test
29 |
30 | # Add files and clean up unnecessary files
31 | ADD include_files/redmine_apache.conf /etc/apache2/redmine_apache.conf
32 | ADD include_files/start.sh /start.sh
33 |
34 | EXPOSE 3000
35 |
36 | CMD /start.sh
37 |
--------------------------------------------------------------------------------
/Dockerfile-3.2:
--------------------------------------------------------------------------------
1 | # Dockerized Redmine
2 |
3 | FROM ubuntu:14.04
4 | MAINTAINER Viktor Petersson
5 |
6 | # Install required packages
7 | RUN apt-get -qq update && \
8 | apt-get -qq install -y wget ruby ruby-dev build-essential imagemagick libmagickwand-dev libmysqlclient-dev apache2 apt-transport-https ca-certificates git-core subversion && \
9 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 && \
10 | echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" > /etc/apt/sources.list.d/passenger.list && \
11 | apt-get -qq update && \
12 | apt-get -qq install -y libapache2-mod-passenger && \
13 | apt-get clean
14 |
15 | # Fetch the latest redmine repo (and delete `.git`) to save space)
16 | ENV BRANCH 3.2-stable
17 | RUN cd /usr/local && \
18 | git clone https://github.com/redmine/redmine.git && \
19 | cd redmine && \
20 | git checkout $BRANCH && \
21 | rm -rf .git
22 |
23 | RUN touch /usr/local/redmine/log/production.log
24 | WORKDIR /usr/local/redmine
25 |
26 | # Install dependencies
27 | RUN gem install -q bundler mysql2 && \
28 | bundle install --without development test
29 |
30 | # Add files and clean up unnecessary files
31 | ADD include_files/redmine_apache.conf /etc/apache2/redmine_apache.conf
32 | ADD include_files/start.sh /start.sh
33 |
34 | EXPOSE 3000
35 |
36 | CMD /start.sh
37 |
--------------------------------------------------------------------------------
/include_files/config/database.yml:
--------------------------------------------------------------------------------
1 | # Default setup is given for MySQL with ruby1.9. If you're running Redmine
2 | # with MySQL and ruby1.8, replace the adapter name with `mysql`.
3 | # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
4 | # Line indentation must be 2 spaces (no tabs).
5 |
6 | production:
7 | adapter: mysql2
8 | database: redmine
9 | host: localhost
10 | username: root
11 | password: ""
12 | encoding: utf8
13 |
14 | development:
15 | adapter: mysql2
16 | database: redmine_development
17 | host: localhost
18 | username: root
19 | password: ""
20 | encoding: utf8
21 |
22 | # Warning: The database defined as "test" will be erased and
23 | # re-generated from your development database when you run "rake".
24 | # Do not set this db to the same as development or production.
25 | test:
26 | adapter: mysql2
27 | database: redmine_test
28 | host: localhost
29 | username: root
30 | password: ""
31 | encoding: utf8
32 |
33 | # PostgreSQL configuration example
34 | #production:
35 | # adapter: postgresql
36 | # database: redmine
37 | # host: localhost
38 | # username: postgres
39 | # password: "postgres"
40 |
41 | # SQLite3 configuration example
42 | #production:
43 | # adapter: sqlite3
44 | # database: db/redmine.sqlite3
45 |
46 | # SQL Server configuration example
47 | #production:
48 | # adapter: sqlserver
49 | # database: redmine
50 | # host: localhost
51 | # username: jenkins
52 | # password: jenkins
53 |
--------------------------------------------------------------------------------
/include_files/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | prepare_fs() {
4 | echo "Creating necessary folders and setting permission..."
5 | mkdir -p /usr/local/redmine/{log,files,tmp,tmp/pdf,public/plugin_assets}
6 | chown -R www-data:www-data /usr/local/redmine/*
7 | chmod -R 0755 /usr/local/redmine/{files,tmp,tmp/pdf,public/plugin_assets}
8 | }
9 |
10 | # Only run the migration if the environment
11 | # variable 'RUN_MIGRATION' is set.
12 | run_migration() {
13 | echo "Running Redmine migration scripts..."
14 | cd /usr/local/redmine
15 | RAILS_ENV=production rake db:migrate
16 | }
17 |
18 | generate_secret() {
19 | echo "Generating secret..."
20 | cd /usr/local/redmine
21 | RAILS_ENV=production rake generate_secret_token
22 | }
23 |
24 | # Install the bundle. This is useful if you install
25 | # a new plugin that adds new dependencies.
26 | install_bundle() {
27 | echo "Installing bundle..."
28 | cd /usr/local/redmine
29 | RAILS_ENV=production bundle install --without development test
30 | }
31 |
32 | launch_apache() {
33 | echo "Launching Apache..."
34 | apache2ctl \
35 | -f /etc/apache2/redmine_apache.conf \
36 | -D FOREGROUND
37 | }
38 |
39 | # If 'ENABLE_GIT_USER' is set, create a `git` user
40 | # and add www-data to the user. This is useful if you
41 | # need to access a git repository on the host server.
42 | enable_git_user() {
43 | echo "Adding 'git' user and group..."
44 | groupadd -g 3002 git
45 | useradd -u 3002 -g git git
46 | usermod -a -G git www-data
47 | }
48 |
49 | # If 'ENABLE_LINKED_MYSQL' is set, this function
50 | # will generate your database.yml file based on a
51 | # set of environment variables. This is useful when
52 | # you're using a linked MySQL container.
53 | generate_database_yml() {
54 | echo -e "production:\n \
55 | adapter: mysql2\n \
56 | database: $REDMINE_DB\n \
57 | host: $MYSQL_PORT_3306_TCP_ADDR\n \
58 | port: $MYSQL_PORT_3306_TCP_PORT\n \
59 | username: $REDMINE_DB_USER\n \
60 | password: \"$REDMINE_DB_PASS\"\n \
61 | encoding: utf8" > \
62 | /usr/local/redmine/config/database.yml
63 | }
64 |
65 | # Make sure the permissions are properly set.
66 | prepare_fs
67 |
68 | if [ -n "$ENABLE_LINKED_MYSQL" ]; then
69 | generate_database_yml
70 |
71 | echo "This is your database-config file: "
72 | cat /usr/local/redmine/config/database.yml
73 | fi
74 |
75 | if [ -n "$ENABLE_GIT_USER" ]; then
76 | enable_git_user
77 | fi
78 |
79 | # Run migration and exit.
80 | if [ -n "$RUN_MIGRATION" ]; then
81 | run_migration
82 | exit 0
83 | fi
84 |
85 | # Run bundle install.
86 | if [ -n "$INSTALL_BUNDLE" ]; then
87 | install_bundle
88 | fi
89 |
90 |
91 | # Normal startup process
92 | generate_secret
93 | launch_apache &
94 | tail -f /var/log/apache2/*.log /usr/local/redmine/log/production.log
95 |
--------------------------------------------------------------------------------
/include_files/config/settings.yml:
--------------------------------------------------------------------------------
1 | # Redmine - project management software
2 | # Copyright (C) 2006-2014 Jean-Philippe Lang
3 | #
4 | # This program is free software; you can redistribute it and/or
5 | # modify it under the terms of the GNU General Public License
6 | # as published by the Free Software Foundation; either version 2
7 | # of the License, or (at your option) any later version.
8 | #
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program; if not, write to the Free Software
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 |
18 |
19 | # DO NOT MODIFY THIS FILE !!!
20 | # Settings can be defined through the application in Admin -> Settings
21 |
22 | app_title:
23 | default: Redmine
24 | app_subtitle:
25 | default: Project management
26 | welcome_text:
27 | default:
28 | login_required:
29 | default: 0
30 | self_registration:
31 | default: '2'
32 | lost_password:
33 | default: 1
34 | unsubscribe:
35 | default: 1
36 | password_min_length:
37 | format: int
38 | default: 8
39 | # Maximum lifetime of user sessions in minutes
40 | session_lifetime:
41 | format: int
42 | default: 0
43 | # User session timeout in minutes
44 | session_timeout:
45 | format: int
46 | default: 0
47 | attachment_max_size:
48 | format: int
49 | default: 5120
50 | issues_export_limit:
51 | format: int
52 | default: 500
53 | activity_days_default:
54 | format: int
55 | default: 30
56 | per_page_options:
57 | default: '25,50,100'
58 | mail_from:
59 | default: redmine@example.net
60 | bcc_recipients:
61 | default: 1
62 | plain_text_mail:
63 | default: 0
64 | text_formatting:
65 | default: textile
66 | cache_formatted_text:
67 | default: 0
68 | wiki_compression:
69 | default: ""
70 | default_language:
71 | default: en
72 | force_default_language_for_anonymous:
73 | default: 0
74 | force_default_language_for_loggedin:
75 | default: 0
76 | host_name:
77 | default: localhost:3000
78 | protocol:
79 | default: http
80 | feeds_limit:
81 | format: int
82 | default: 15
83 | gantt_items_limit:
84 | format: int
85 | default: 500
86 | # Maximum size of files that can be displayed
87 | # inline through the file viewer (in KB)
88 | file_max_size_displayed:
89 | format: int
90 | default: 512
91 | diff_max_lines_displayed:
92 | format: int
93 | default: 1500
94 | enabled_scm:
95 | serialized: true
96 | default:
97 | - Subversion
98 | - Darcs
99 | - Mercurial
100 | - Cvs
101 | - Bazaar
102 | - Git
103 | autofetch_changesets:
104 | default: 1
105 | sys_api_enabled:
106 | default: 0
107 | sys_api_key:
108 | default: ''
109 | commit_cross_project_ref:
110 | default: 0
111 | commit_ref_keywords:
112 | default: 'refs,references,IssueID'
113 | commit_update_keywords:
114 | serialized: true
115 | default: []
116 | commit_logtime_enabled:
117 | default: 0
118 | commit_logtime_activity_id:
119 | format: int
120 | default: 0
121 | # autologin duration in days
122 | # 0 means autologin is disabled
123 | autologin:
124 | format: int
125 | default: 0
126 | # date format
127 | date_format:
128 | default: ''
129 | time_format:
130 | default: ''
131 | user_format:
132 | default: :firstname_lastname
133 | format: symbol
134 | cross_project_issue_relations:
135 | default: 0
136 | # Enables subtasks to be in other projects
137 | cross_project_subtasks:
138 | default: 'tree'
139 | issue_group_assignment:
140 | default: 0
141 | default_issue_start_date_to_creation_date:
142 | default: 1
143 | notified_events:
144 | serialized: true
145 | default:
146 | - issue_added
147 | - issue_updated
148 | mail_handler_body_delimiters:
149 | default: ''
150 | mail_handler_excluded_filenames:
151 | default: ''
152 | mail_handler_api_enabled:
153 | default: 0
154 | mail_handler_api_key:
155 | default:
156 | issue_list_default_columns:
157 | serialized: true
158 | default:
159 | - tracker
160 | - status
161 | - priority
162 | - subject
163 | - assigned_to
164 | - updated_on
165 | display_subprojects_issues:
166 | default: 1
167 | issue_done_ratio:
168 | default: 'issue_field'
169 | default_projects_public:
170 | default: 1
171 | default_projects_modules:
172 | serialized: true
173 | default:
174 | - issue_tracking
175 | - time_tracking
176 | - news
177 | - documents
178 | - files
179 | - wiki
180 | - repository
181 | - boards
182 | - calendar
183 | - gantt
184 | default_projects_tracker_ids:
185 | serialized: true
186 | default:
187 | # Role given to a non-admin user who creates a project
188 | new_project_user_role_id:
189 | format: int
190 | default: ''
191 | sequential_project_identifiers:
192 | default: 0
193 | # encodings used to convert repository files content to UTF-8
194 | # multiple values accepted, comma separated
195 | repositories_encodings:
196 | default: ''
197 | # encoding used to convert commit logs to UTF-8
198 | commit_logs_encoding:
199 | default: 'UTF-8'
200 | repository_log_display_limit:
201 | format: int
202 | default: 100
203 | ui_theme:
204 | default: ''
205 | emails_footer:
206 | default: |-
207 | You have received this notification because you have either subscribed to it, or are involved in it.
208 | To change your notification preferences, please click here: http://hostname/my/account
209 | gravatar_enabled:
210 | default: 0
211 | openid:
212 | default: 0
213 | gravatar_default:
214 | default: ''
215 | start_of_week:
216 | default: ''
217 | rest_api_enabled:
218 | default: 0
219 | jsonp_enabled:
220 | default: 0
221 | default_notification_option:
222 | default: 'only_my_events'
223 | emails_header:
224 | default: ''
225 | thumbnails_enabled:
226 | default: 0
227 | thumbnails_size:
228 | format: int
229 | default: 100
230 | non_working_week_days:
231 | serialized: true
232 | default:
233 | - '6'
234 | - '7'
235 |
--------------------------------------------------------------------------------
/include_files/config/configuration.yml:
--------------------------------------------------------------------------------
1 | # = Redmine configuration file
2 | #
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.
5 | # Environment specific configuration options override the default ones.
6 | #
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.
9 | #
10 | # == Outgoing email settings (email_delivery setting)
11 | #
12 | # === Common configurations
13 | #
14 | # ==== Sendmail command
15 | #
16 | # production:
17 | # email_delivery:
18 | # delivery_method: :sendmail
19 | #
20 | # ==== Simple SMTP server at localhost
21 | #
22 | # production:
23 | # email_delivery:
24 | # delivery_method: :smtp
25 | # smtp_settings:
26 | # address: "localhost"
27 | # port: 25
28 | #
29 | # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
30 | #
31 | # production:
32 | # email_delivery:
33 | # delivery_method: :smtp
34 | # smtp_settings:
35 | # address: "example.com"
36 | # port: 25
37 | # authentication: :login
38 | # domain: 'foo.com'
39 | # user_name: 'myaccount'
40 | # password: 'password'
41 | #
42 | # ==== SMTP server at example.com using PLAIN authentication
43 | #
44 | # production:
45 | # email_delivery:
46 | # delivery_method: :smtp
47 | # smtp_settings:
48 | # address: "example.com"
49 | # port: 25
50 | # authentication: :plain
51 | # domain: 'example.com'
52 | # user_name: 'myaccount'
53 | # password: 'password'
54 | #
55 | # ==== SMTP server at using TLS (GMail)
56 | #
57 | # This might require some additional configuration. See the guides at:
58 | # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
59 | #
60 | # production:
61 | # email_delivery:
62 | # delivery_method: :smtp
63 | # smtp_settings:
64 | # enable_starttls_auto: true
65 | # address: "smtp.gmail.com"
66 | # port: 587
67 | # domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
68 | # authentication: :plain
69 | # user_name: "your_email@gmail.com"
70 | # password: "your_password"
71 | #
72 | #
73 | # === More configuration options
74 | #
75 | # See following page:
76 | #
77 | # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
78 |
79 |
80 | # default configuration options for all environments
81 | default:
82 | # Outgoing emails configuration (see examples above)
83 | email_delivery:
84 | delivery_method: :smtp
85 | smtp_settings:
86 | address: smtp.example.net
87 | port: 25
88 | domain: example.net
89 | authentication: :login
90 | user_name: "redmine@example.net"
91 | password: "redmine"
92 |
93 | # Absolute path to the directory where attachments are stored.
94 | # The default is the 'files' directory in your Redmine instance.
95 | # Your Redmine instance needs to have write permission on this
96 | # directory.
97 | # Examples:
98 | # attachments_storage_path: /var/redmine/files
99 | # attachments_storage_path: D:/redmine/files
100 | attachments_storage_path:
101 |
102 | # Configuration of the autologin cookie.
103 | # autologin_cookie_name: the name of the cookie (default: autologin)
104 | # autologin_cookie_path: the cookie path (default: /)
105 | # autologin_cookie_secure: true sets the cookie secure flag (default: false)
106 | autologin_cookie_name:
107 | autologin_cookie_path:
108 | autologin_cookie_secure:
109 |
110 | # Configuration of SCM executable command.
111 | #
112 | # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
113 | # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
114 | #
115 | # On Windows + JRuby 1.6.2, path which contains spaces does not work.
116 | # For example, "C:\Program Files\TortoiseHg\hg.exe".
117 | # If you want to this feature, you need to install to the path which does not contains spaces.
118 | # For example, "C:\TortoiseHg\hg.exe".
119 | #
120 | # Examples:
121 | # scm_subversion_command: svn # (default: svn)
122 | # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
123 | # scm_git_command: /usr/local/bin/git # (default: git)
124 | # scm_cvs_command: cvs # (default: cvs)
125 | # scm_bazaar_command: bzr.exe # (default: bzr)
126 | # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
127 | #
128 | scm_subversion_command:
129 | scm_mercurial_command:
130 | scm_git_command:
131 | scm_cvs_command:
132 | scm_bazaar_command:
133 | scm_darcs_command:
134 |
135 | # Absolute path to the SCM commands errors (stderr) log file.
136 | # The default is to log in the 'log' directory of your Redmine instance.
137 | # Example:
138 | # scm_stderr_log_file: /var/log/redmine_scm_stderr.log
139 | scm_stderr_log_file:
140 |
141 | # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
142 | # If you don't want to enable data encryption, just leave it blank.
143 | # WARNING: losing/changing this key will make encrypted data unreadable.
144 | #
145 | # If you want to encrypt existing passwords in your database:
146 | # * set the cipher key here in your configuration file
147 | # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
148 | #
149 | # If you have encrypted data and want to change this key, you have to:
150 | # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
151 | # * change the cipher key here in your configuration file
152 | # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
153 | database_cipher_key:
154 |
155 | # Set this to false to disable plugins' assets mirroring on startup.
156 | # You can use `rake redmine:plugins:assets` to manually mirror assets
157 | # to public/plugin_assets when you install/upgrade a Redmine plugin.
158 | #
159 | #mirror_plugins_assets_on_startup: false
160 |
161 | # Your secret key for verifying cookie session data integrity. If you
162 | # change this key, all old sessions will become invalid! Make sure the
163 | # secret is at least 30 characters and all random, no regular words or
164 | # you'll be exposed to dictionary attacks.
165 | #
166 | # If you have a load-balancing Redmine cluster, you have to use the
167 | # same secret token on each machine.
168 | #secret_token: 'change it to a long random string'
169 |
170 | # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
171 | # the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
172 | #imagemagick_convert_command:
173 |
174 | # Configuration of RMagcik font.
175 | #
176 | # Redmine uses RMagcik in order to export gantt png.
177 | # You don't need this setting if you don't install RMagcik.
178 | #
179 | # In CJK (Chinese, Japanese and Korean),
180 | # in order to show CJK characters correctly,
181 | # you need to set this configuration.
182 | #
183 | # Because there is no standard font across platforms in CJK,
184 | # you need to set a font installed in your server.
185 | #
186 | # This setting is not necessary in non CJK.
187 | #
188 | # Examples for Japanese:
189 | # Windows:
190 | # rmagick_font_path: C:\windows\fonts\msgothic.ttc
191 | # Linux:
192 | # rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
193 | #
194 | rmagick_font_path:
195 |
196 | # Maximum number of simultaneous AJAX uploads
197 | #max_concurrent_ajax_uploads: 2
198 |
199 | # Configure OpenIdAuthentication.store
200 | #
201 | # allowed values: :memory, :file, :memcache
202 | #openid_authentication_store: :memory
203 |
204 | # specific configuration options for production environment
205 | # that overrides the default ones
206 | production:
207 |
208 | # specific configuration options for development environment
209 | # that overrides the default ones
210 | development:
211 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Dockerized Redmine
2 |
3 | **Update**: Don't use this image. Instead use the [official image](https://hub.docker.com/_/redmine/)
4 |
5 |
6 | If you're like me, you like to keep your servers as clean as possible. However, in order to run [Redmine](http://www.redmine.org/), you need to install *a lot* of Ruby packages.
7 |
8 | With this solution, you can put Redmine in a [Docker](http://docker.io) container and keep your host server clean. In addition, it also simplifying and speeding up the deployment of Redmine.
9 |
10 | The container contains a full-blown Redmine installation running on Ubuntu 14.04 (with Apache and Passenger).
11 |
12 | ## Fetching the container
13 |
14 | To fetch this pre-installed Redmine container:
15 |
16 | $ docker pull vpetersson/redmine
17 |
18 | or
19 |
20 | $ docker pull vpetersson/redmine:[branch]
21 |
22 | where [branch] is:
23 |
24 | * 2.5
25 | * 2.6
26 | * 3.1
27 | * 3.2
28 |
29 | ## Preparing the host
30 |
31 | Given that Docker containers are designed to be somewhat ephimeral, we don't want to store our persistant data inside the container. All we want is Redmine and the required dependencies. We will then utilize Docker's 'Volumes' support, and mount the relevant files outside of Docker (on the host system). This also allows us to easily upgrade between Redmine version (i.e. upgrading the Docker container) without losing any data.
32 |
33 | In order to do this, we will need to create the following folders on your host server:
34 |
35 | * /usr/local/redmine-store/config
36 | * /usr/local/redmine-store/files
37 | * /usr/local/redmine-store/plugins (optional)
38 | * /usr/local/redmine-store/themes (optional)
39 |
40 | You may place these folders somewhere else, just make sure you update the corresponding paths below.
41 |
42 | With that done, you now need to create two files. First, we need to create the `/usr/local/redmine-store/config/configuration.yml` file. You'll find plenty of examples [here](http://www.redmine.org/projects/redmine/repository/entry/branches/2.5-stable/config/configuration.yml.example). A real simple config file would only include the email configuration, and look something like this:
43 |
44 | production:
45 | email_delivery:
46 | delivery_method: :smtp
47 | smtp_settings:
48 | enable_starttls_auto: true
49 | address: "smtp.gmail.com"
50 | port: 587
51 | domain: "smtp.gmail.com" # 'your.domain.com' for Google Apps
52 | authentication: :plain
53 | user_name: "your_email@gmail.com"
54 | password: "your_password"
55 |
56 | Next, we need to configure the database connection. This is a bit trickier. While Redmine could use multiple back-ends, this container is configured to use MySQL.
57 |
58 | Since we don't run the database in the same Docker container, we need to connect over TCP/IP, or alternatively use a socket and mount that into the container.
59 |
60 | One 'gotcha' here is that you cannot connect to '127.0.0.1' on the host server within a Docker container. Hence, if you're running MySQL on the same server, the easiest way is to use a socket.
61 |
62 | If you're using a socket, then you're `/usr/local/redmine-store/config/database.yml` file would look something like this:
63 |
64 | production:
65 | adapter: mysql2
66 | database: redmine
67 | socket: /tmp/mysql.sock
68 | username: redmine
69 | password: something
70 | encoding: utf8
71 |
72 | When using a socket, you also need to make sure to pass on the following to your Docker run command `-v /path/to/mysql.sock:/tmp/mysql.sock`.
73 |
74 | If you're on the other hand connecting to a database on a different host, it would look look something like this (replace a.b.c.d with the IP of your server).
75 |
76 | production:
77 | adapter: mysql2
78 | database: redmine
79 | host: a.b.c.d
80 | port: 3306
81 | username: redmine
82 | password: something
83 | encoding: utf8
84 |
85 | ## Running the container
86 |
87 | On the first run, you need to run the container with the `RUN_MIGRATION=True` environment variable. This will trigger the migration to run
88 |
89 | $ docker run --rm \
90 | -v /usr/local/redmine-store/config/database.yml:/usr/local/redmine/config/database.yml:ro \
91 | -v /usr/local/redmine-store/config/configuration.yml:/usr/local/redmine/config/configuration.yml:ro \
92 | -v /usr/local/redmine-store/files:/usr/local/redmine/files \
93 | -e "RUN_MIGRATION=True" \
94 | -i -t vpetersson/redmine:branch
95 |
96 | Assuming the migration went well, you can now start the instance using:
97 |
98 | $ docker run -d \
99 | -v /usr/local/redmine-store/config/database.yml:/usr/local/redmine/config/database.yml:ro \
100 | -v /usr/local/redmine-store/config/configuration.yml:/usr/local/redmine/config/configuration.yml:ro \
101 | -v /usr/local/redmine-store/files:/usr/local/redmine/files \
102 | -p 3000:3000 \
103 | --name redmine \
104 | -i -t vpetersson/redmine:branch
105 |
106 | You should now be able to connect to redmine on `0.0.0.0:3000` on your host server. Since no SSL is used here, it is recommended that you use something like Nginx with SSL as a reverse proxy in front of Redmine.
107 |
108 | You will also find some useful scripts [here](https://github.com/vpetersson/redmine/tree/master/bin).
109 |
110 | ### Optional variables
111 |
112 | * -e "ENABLE_GIT_USER=True"
113 |
114 | Setting this variable will create a git-user and group in the VM. This is useful if you want to be able to read from a git repository on the host. The GID and UID is '3002'.
115 |
116 | * -e "RUN_MIGRATION=True"
117 |
118 | This variable will trigger a migration to be run. This is useful for either the first time you start Redmine on an empty database, or if you've upgraded to a new version. Using this option for every start isn't recommended.
119 |
120 | * -e "INSTALL_BUNDLE=True"
121 |
122 | Runs Bundle install before launching Redmine. This is useful for some plugins.
123 |
124 | * -e "ENABLE_LINKED_MYSQL=True"
125 |
126 | This is to enable the usage of a linked MySQL container. Please see more below.
127 |
128 | ## FAQ
129 |
130 | ### How do I use this container with a linked MySQL/MariaDB container?
131 |
132 | Good question! If you're a more seasoned Docker user, chances are you've placed MySQL/MariaDB inside a Docker container already.
133 |
134 | Since Docker's built-in Link functionality relies on environment variables, we must be able to generate the `database.yml` file on-the-fly.
135 |
136 | To solve this, there's a environment varialbe named 'ENABLE_LINKED_MYSQL'. If this one is exported and set to 'True' (well actually, it doesn't matter what you set it to, as long as it is set), a function will kick in during the launch procedure that automatically generates the database file.
137 |
138 | This script relies on that you alias the link to 'mysql' (eg. mysql:mysql) and also export the following varialbes:
139 |
140 | * REDMINE_DB
141 | * REDMINE_DB_USER
142 | * REDMINE_DB_PASS
143 |
144 | This also of course assumes that the database exists, and that the credentials work.
145 |
146 | Also, please not that you **should not** mount a `database.yml` file from the host-system when using this approach.
147 |
148 | ### How do I run plugins?
149 |
150 | First, make sure you have a plugin folder on the host, such as `/usr/local/redmine-store/plugins`.
151 |
152 | Next, mount the volume by adding:
153 |
154 | -v /usr/local/redmine-store/plugins:/usr/local/redmine/plugins
155 |
156 | You should now be able to install plugins into this folder on the host.
157 |
158 | If your plugin requires additional rependencies, make sure to add `-e "INSTALL_BUNDLE=True"` when you run your upgrade.
159 |
160 | ### How do I use themes?
161 |
162 | In order to use themes with Redmine, you first need to download Redmine and copy in the default themes into `/usr/local/redmine-store/themes`. After you've done this, you can copy in your themes into this folder.
163 |
164 | With that done, now append the following mount to Redmine:
165 |
166 | -v /usr/local/redmine-store/themes:/usr/local/redmine/public/themes
167 |
168 | Your themes should now show up in the theme section.
169 |
170 | ## Recommended plugins
171 |
172 | * [Agile Plugin](http://redminecrm.com/projects/agile/pages/1): Adds Agile to Redmine, complete with burn-down charts.
173 | * [Issue Checklist](http://redminecrm.com/projects/checklist/pages/1): Adds a checklist to issues.
174 | * [Readme At Repositories](http://www.redmine.org/plugins/readme_at_repositories): Displays README files in repositories.
175 | * [Flowdock](https://github.com/flowdock/redmine_flowdock): A [Flowdock](https://www.flowdock.com) integration for Redmine.
176 |
--------------------------------------------------------------------------------