Project

General

Profile

AlmaLinux/CentOS based Redmine docker image with Nginx+Passenger

Added by Junhua Wang 10 months ago

I created this image based on our company's redmine 3.3.3 edition, and I provided 5.1.1, 5.0.7, 4.2.11 and 3.3.3 images here:

https://hub.docker.com/r/tangramor/redmine

The docker scripts can be found here: https://github.com/tangramor/redmine_docker


Replies (3)

RE: AlmaLinux/CentOS based Redmine docker image with Nginx+Passenger - Added by Junhua Wang 7 months ago

Redmine Docker image with Nginx + Passenger

This image is production ready.
Support MySQL for now.

Versions/Tags

Usage

For each version/tag, there are related docker-compose.yml file and config folder. You can find them by click the tag’s link to Github repository.
Please edit database user/password in docker-compose.yml, config/database.yml and initial.sql:

•MySQL root user: default password Password1
•MySQL redmine user: default password Password2

For version 3.3.3 or 4.2.11, please edit the LOCALE environment variable in docker-compose.yml to support different languages, such as LOCALE=zh_CN.UTF-8.
Please edit the volumes mapping in docker-compose.yml.

•Redmine data: /home/redmine
•MySQL data: /home/mysql<version>_data

Launch containers

Then you can use docker compose up -d to launch the containers. The scripts will automatically create redmine databases and execute rake db:migrate , rake generate_secret_token commands.

Note : If you don’t want to run rake db:migrage but import database by yourself, create an empty file config/init_db.lock .

Once the setup process is done, you can use docker ps or docker compose ps command to check the healthy status of the containers. It costs about 2 minutes.

Load database default dataset

You may want load default dataset according to https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Step-7-Database-default-data-set . Following are the steps:


# enter container
docker exec -it -u service -w /var/www/html/redmine redmine bash

# load .bash_profile
$ source ~/.bash_profile

# load default dataset
$ RAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data

Logging into the application

Use default administrator account to log in http://127.0.0.1 :

•login: admin
•password: admin

Secret

The docker scripts generated SECRET_KEY_BASE environment variable. If you want to regenerate it, you may execute following commands:

docker exec -i redmine sed -i '/SECRET_KEY_BASE/d' /home/service/.bash_profile
docker exec -i redmine rm -f /var/www/html/redmine/config/init_secret.lock
docker exec -i redmine bash -c /start.sh

Add Plugins

For example, install redmine_agile. You registered an email to get the download link for the free edition and downloaded redmine_agile-x_x_x-light.zip. Copy this file to /home/redmine/plugins (in my case), and execute following commands:

# enter container
docker exec -it -u service -w /var/www/html/redmine redmine bash

# load .bash_profile
$ source ~/.bash_profile

# unzip plugin archive
$ cd plugins
$ unzip -a redmine_agile-x_x_x-light.zip

# Install required gems
$ cd ..
$ bundle install --without development test --no-deployment

# Migrate plugin's tables
$ bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production

# Restart Redmine app
$ touch tmp/restart.txt

RE: AlmaLinux/CentOS based Redmine docker image with Nginx+Passenger - Added by Junhua Wang 7 months ago

Just upgraded to current version:

RE: AlmaLinux/CentOS based Redmine docker image with Nginx+Passenger - Added by Junhua Wang 16 days ago

Upgraded to latest version:

    (1-3/3)