Redmine is a flexible project management web application written using Ruby on Rails framework.
More details can be found in the doc directory or on the official website http://www.redmine.org
This installation is for setting up development of this Redmine repository using WSL2 or Linux (Debian based distros)
Follow this tutorial to get Ruby and Rails installed.
For development, setup a PostgreSQL server with Docker Compose (Docker needs to be installed) with the command:
./scripts/postgres-up.sh
To be able to install pg
, the following dependencies need to be installed:
sudo apt install postgresql-contrib libpq-dev1
Then RMagick
needs to be enabled, which needs the following dependencies:
sudo apt install pkg-config
sudo apt install imagemagick
sudo apt install libmagick++-dev
After RMagick can be installed with:
gem install rmagick
The following command then installs the project dependencies for development:
bundle install
For production the command is slightly different:
BUNDLER_WITHOUT="development test" bundle install
This step generates a random key used by Rails to encode cookies storing session data thus preventing their tampering. Generating a new secret token invalidates all existing sessions after restart.
bundle exec rake generate_secret_token
Create the database structure, by running the following command under the application root directory:
RAILS_ENV=development bundle exec rake db:migrate
For production the command is slightly different:
RAILS_ENV=production bundle exec rake db:migrate
In some cases (e.g. switching between production and development environment) the bundles need to be installed anew. The following commands can be run to renew the bundle installation:
bundle config --delete without
bundle config --delete with
bundle install
Insert default configuration data in database, by running the following command:
RAILS_ENV=development bundle exec rake redmine:load_default_data
For production the command is slightly different:
RAILS_ENV=production bundle exec rake redmine:load_default_data
The user account running the application must have write permission on the following subdirectories:
mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R <username>:<username> files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
The server can be run with the command:
./scripts/run.sh
If database has not started before run.sh
, execute:
./scripts/postgres-up.sh
This command starts server running on port 3000 accessible via localhost:3000.
Use default administrator account to log in:
- login: admin
- password: admin (after setup: Administrator)