A simple Docker Compose setup to quickly deploy Redmine with PostgreSQL.
- 🚀 One-command deployment
- 🐘 PostgreSQL database
- 🔧 Easy configuration via
.envfile - 📁 Persistent data storage
- 🎨 Custom themes support
- 🔌 Plugin support
-
Clone this repository
git clone https://github.com/haru/redmine-compose.git cd redmine -
Configure environment variables
Copy the example
.envfile and edit as needed:cp .env.example .env
Generate a secret key and update
.env:openssl rand -hex 64
-
Start Redmine
docker compose up -d
-
Access Redmine
Open your browser and navigate to: http://localhost:3000
Default login credentials:
- Username:
admin - Password:
admin
⚠️ Please change the default password immediately after first login. - Username:
Edit the .env file to customize your setup:
| Variable | Description | Default |
|---|---|---|
REDMINE_VERSION |
Redmine Docker image version | latest |
REDMINE_PORT |
Port to access Redmine | 3000 |
DB_USER |
PostgreSQL username | redmine |
DB_PASSWORD |
PostgreSQL password | password |
DB_NAME |
PostgreSQL database name | redmine |
REDMINE_SECRET_KEY_BASE |
Secret key for session encryption | (required) |
Generate a secure secret key using one of the following methods:
# Using OpenSSL (recommended)
openssl rand -hex 64
# Using Redmine's rake task
docker compose run --rm redmine bundle exec rake secret.
├── docker-compose.yml # Docker Compose configuration
├── .env # Environment variables
├── db_data/ # PostgreSQL data (persistent)
├── files/ # Redmine uploaded files (persistent)
├── plugins/ # Redmine plugins
└── themes/ # Redmine themes
Place your plugins in the plugins/ directory:
cd plugins
git clone <plugin-repository-url>Then restart Redmine:
docker compose restart redminePlugin migrations are automatically executed on container restart.
Place your themes in the themes/ directory:
cd themes
git clone <theme-repository-url>After adding a theme, go to Administration → Settings → Display in Redmine to select it.
⚠️ For Redmine < 6.0: The themes directory location is different. You need to change the mount point indocker-compose.yml:# Change this line: - ./themes:/usr/src/redmine/themes # To: - ./themes:/usr/src/redmine/public/themes
# Start services
docker compose up -d
# Stop services
docker compose down
# View logs
docker compose logs -f
# View Redmine logs only
docker compose logs -f redmine
# Restart Redmine
docker compose restart redmine
# Access Redmine container shell
docker compose exec redmine bash
# Run Redmine rake tasks
docker compose exec redmine bundle exec rake <task>All data is stored in this directory. Simply back up the entire project folder to preserve:
db_data/- PostgreSQL databasefiles/- Uploaded filesplugins/- Installed pluginsthemes/- Installed themes.env- Configuration
# Example: Create a backup archive
tar -czvf redmine-backup-$(date +%Y%m%d).tar.gz .
⚠️ Always back up your data before upgrading.
docker compose pull
docker compose down
docker compose up -d-
Edit
.envand update the version:REDMINE_VERSION=6.1
-
Pull the new image and restart:
docker compose pull docker compose down docker compose up -d
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.