Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Redmine 5.x #88

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .docker/mysql/init/01-databases.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
-- Create databases.
CREATE DATABASE IF NOT EXISTS `redmine_development`;
CREATE DATABASE IF NOT EXISTS `redmine_test`;

-- Grant permissions.
GRANT ALL PRIVILEGES ON redmine_development.* TO 'redmine';

CREATE DATABASE IF NOT EXISTS `redmine_test`;
GRANT ALL PRIVILEGES ON redmine_test.* TO 'redmine';

CREATE DATABASE IF NOT EXISTS `redmine_production`;
GRANT ALL PRIVILEGES ON redmine_production.* TO 'redmine';
10 changes: 8 additions & 2 deletions .docker/redmine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM redmine:4.2
FROM redmine:5.1

ENV LANG=en_us

RUN apt update -qq > /dev/null \
&& apt install -qqy build-essential make vim less > /dev/null
&& apt install -qqy build-essential make vim less libxslt-dev libxml2-dev > /dev/null \
&& ln -s /usr/include/libxml2/libxml /usr/include/libxml \
&& chmod o+t -R /tmp

# Force the "development" environment.
# See docker-compose.yml for documentation.
ENV RAILS_ENV=development

CMD ["rails", "server", "-b", "0.0.0.0"]
Empty file.
4 changes: 4 additions & 0 deletions .docker/redmine/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ development:
test:
<<: *default
database: redmine_test

production:
<<: *default
database: redmine_production
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ task :provision do
puts 'Installing dev packages...'
sleep(2)
sh 'docker compose exec redmine bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32'
sh 'docker compose exec redmine bundle config set with "default dev test"'
sh 'docker compose exec redmine bundle config --delete without'
sh 'docker compose exec redmine bundle install'

puts 'Preparing database...'
Expand Down
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ services:
- mysql
- mailhog
environment:
RAILS_ENV: development
# Unfortunately, using RAILS_ENV in the docker-compose.yml file causes
# an error. Thus, as per community suggestions, we set the environment
# to "production" and then change it to "development" in the Dockerfile.
#
# See https://github.com/docker-library/redmine/issues/298
RAILS_ENV: production
REDMINE_LANG: en
REDMINE_DB_MYSQL: mysql
REDMINE_DB_ENCODING: utf8
Expand All @@ -23,7 +28,6 @@ services:
- ./.docker/redmine/seeds.rb:/usr/src/redmine/db/seeds.rb
- ./.docker/redmine/configuration.yml:/usr/src/redmine/config/configuration.yml
- ./.docker/redmine/database.yml:/usr/src/redmine/config/database.yml
- ./.docker/redmine/additional_environment.rb:/usr/src/redmine/config/additional_environment.rb
mysql:
image: mariadb:10.6
container_name: t2r-5x-mysql
Expand Down
Loading