Using docker-compose for redmine
What is docker-compose
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see the list of features. More details could be found here.
What is Redmine
Redmine is a free and open source, web-based project management and issue tracking tool. It allows users to manage multiple projects and associated subprojects. It features per project wikis and forums, time tracking, and flexible role based access control. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. Redmine integrates with various version control systems and includes a repository browser and diff viewer.

Why use docker-compose for Redmine
Redmine has two components, one is database service and another one is Redmine web service. Those two components are tightly tied together, so it would be better to specify them in a single YAML file and use one single command to start the entire Redmine service.
Getting started
Prepare the YAML file named
docker-compose.yaml.
Refer to official compose file doc for more details on each properties.
Once you have the
docker-compose.yamlfile ready, you could just rundocker-compose up -dto bring up those services.-dmeans detached mode.
docker-compose psto check the status.
Now you would be able to access the redmine from
localhost:3000. According to the Redmine doc, the default username and password areadmin/admin
Backup and Restoration the Redmine
Backup
Redmine backups should include:
Database
Attachments (stored in the
filesdirectory under the installation directory by default)
For attachments, we have the attachments folder mounted on host, so we could easily backup the attachments under files directory.
For database(PostgreSQL in our example), the following commands need to be executed:
You can find <username>, <hostname>, and <redmine_database> in the file config/database.yml. <hostname> may not be required depending on your installation of the database. The pg_dumpcommand will prompt you to enter the password when necessary.
Restoration
For attachments, you do not need to do anything specific since those files have been mounted on host. If container restarts, they will be re-mounted into container.
For database, the following commands need to be executed:
More backup and restoration details could be found here
Online help
Last updated
Was this helpful?