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

Release: 6.0.1 #568

Merged
merged 6 commits into from
Nov 13, 2024
Merged
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
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**6.0.1**
- redmine: upgrade to v6.0.1
- `make test-release` now creates certificates for ssl

**5.1.4**
- redmine: upgrade to v5.1.4

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ruby:3.2-slim-bookworm
LABEL maintainer="[email protected]"

ENV RUBY_VERSION=3.2 \
REDMINE_VERSION=5.1.4 \
REDMINE_VERSION=6.0.1 \
REDMINE_USER="redmine" \
REDMINE_HOME="/home/redmine" \
REDMINE_LOG_DIR="/var/log/redmine" \
Expand Down
30 changes: 28 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
IMAGE:=sameersbn/redmine
CERTS_DIR=certs
CERT_FILES=$(CERTS_DIR)/redmine.crt $(CERTS_DIR)/dhparam.pem

.PHONY: test-release generate-certs clean

all: build

help:
Expand All @@ -14,15 +19,36 @@ help:
build:
@docker build --tag=$(IMAGE) .

test-release:

test-release: generate-certs
@echo Clean old run
sudo rm -rf /srv/docker/redmine/
sudo mkdir -p /srv/docker/redmine/redmine
sudo cp -rf certs /srv/docker/redmine/redmine/
sudo cp -rf $(CERTS_DIR) /srv/docker/redmine/redmine/
docker compose down
docker compose build
docker compose up

generate-certs: $(CERT_FILES)

$(CERTS_DIR):
mkdir -p $(CERTS_DIR)

$(CERTS_DIR)/redmine.key: | $(CERTS_DIR)
openssl genrsa -out $(CERTS_DIR)/redmine.key 2048

$(CERTS_DIR)/redmine.csr: $(CERTS_DIR)/redmine.key
openssl req -new -key $(CERTS_DIR)/redmine.key -out $(CERTS_DIR)/redmine.csr

$(CERTS_DIR)/redmine.crt: $(CERTS_DIR)/redmine.csr $(CERTS_DIR)/redmine.key
openssl x509 -req -days 365 -in $(CERTS_DIR)/redmine.csr -signkey $(CERTS_DIR)/redmine.key -out $(CERTS_DIR)/redmine.crt

$(CERTS_DIR)/dhparam.pem: | $(CERTS_DIR)
openssl dhparam -out $(CERTS_DIR)/dhparam.pem 2048

clean:
rm -rf $(CERTS_DIR)

release:
./make_release.sh
@echo "Open https://github.com/sameersbn/docker-redmine/releases and Draft new release"
Expand Down
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Dockerfile to build a [Redmine](http://www.redmine.org/) container image.

## Version

Current Version: **sameersbn/redmine:5.1.4**
Current Version: **sameersbn/redmine:6.0.1**

_P.S.: If your installation depends on various third party plugins, please stick with 2.6.xx series to avoid breakage._

Expand Down Expand Up @@ -108,7 +108,7 @@ docker pull sameersbn/redmine:latest
Since version `2.4.2`, the image builds are being tagged. You can now pull a particular version of redmine by specifying the version number. For example,

```bash
docker pull sameersbn/redmine:5.1.4
docker pull sameersbn/redmine:6.0.1
```

Alternately you can build the image yourself.
Expand Down Expand Up @@ -146,7 +146,7 @@ docker run --name=redmine -d \
--env='REDMINE_PORT=10083' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

**NOTE**: Please allow a minute or two for the Redmine application to start.
Expand Down Expand Up @@ -193,7 +193,7 @@ Volumes can be mounted in docker by specifying the **'-v'** option in the docker
docker run --name=redmine -it --rm \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

## Database
Expand Down Expand Up @@ -244,7 +244,7 @@ docker run --name=redmine -it --rm \
--env='DB_USER=redmine' --env='DB_PASS=password' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

This will initialize the redmine database and after a couple of minutes your redmine instance should be ready to use.
Expand Down Expand Up @@ -290,7 +290,7 @@ We are now ready to start the redmine application.
docker run --name=redmine -it --rm --link=mysql-redmine:mysql \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

Here the image will also automatically fetch the `DB_NAME`, `DB_USER` and `DB_PASS` variables from the mysql container as they are specified in the `docker run` command for the mysql container. This is made possible using the magic of docker links and works with the following images:
Expand Down Expand Up @@ -321,7 +321,7 @@ docker run --name=redmine -it --rm \
--env='DB_USER=redmine' --env='DB_PASS=password' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

This will initialize the redmine database and after a couple of minutes your redmine instance should be ready to use.
Expand Down Expand Up @@ -367,7 +367,7 @@ We are now ready to start the redmine application.
docker run --name=redmine -it --rm --link=postgresql-redmine:postgresql \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

Here the image will also automatically fetch the `DB_NAME`, `DB_USER` and `DB_PASS` variables from the postgresql container as they are specified in the `docker run` command for the postgresql container. This is made possible using the magic of docker links and works with the following images:
Expand All @@ -390,7 +390,7 @@ _Assuming that the memcached server host is 192.168.1.100_
```bash
docker run --name=redmine -it --rm \
--env='MEMCACHE_HOST=192.168.1.100' --env='MEMCACHE_PORT=11211' \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

### Linking to Memcached Container
Expand All @@ -409,7 +409,7 @@ Now you can link memcached to the redmine image:

```bash
docker run --name=redmine -it --rm --link=memcached-redmine:memcached \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

### Mail
Expand All @@ -423,7 +423,7 @@ docker run --name=redmine -it --rm \
--env='[email protected]' --env='SMTP_PASS=PASSWORD' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

If you are not using google mail, then please configure the SMTP host and port using the `SMTP_HOST` and `SMTP_PORT` configuration parameters.
Expand Down Expand Up @@ -509,7 +509,7 @@ docker run --name=redmine -d \
--env='REDMINE_PORT=10445' --env='REDMINE_HTTPS=true' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

In this configuration, any requests made over the plain http protocol will automatically be redirected to use the https protocol. However, this is not optimal when using a load balancer.
Expand All @@ -528,7 +528,7 @@ docker run --name=redmine -d \
--env='NGINX_HSTS_MAXAGE=2592000'
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

If you want to completely disable HSTS set `NGINX_HSTS_ENABLED` to `false`.
Expand All @@ -548,7 +548,7 @@ docker run --name=redmine -d --publish=10083:80 \
--env='REDMINE_HTTPS=true' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

### Deploy to a subdirectory (relative url root)
Expand All @@ -562,7 +562,7 @@ docker run --name=redmine -d --publish=10083:80 \
--env='REDMINE_RELATIVE_URL_ROOT=/redmine' \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

Redmine will now be accessible at the `/redmine` path, e.g. `http://www.example.com/redmine`.
Expand Down Expand Up @@ -593,7 +593,7 @@ Also the container processes seem to be executed as the host's user/group `1000`
```bash
docker run --name=redmine -it --rm [options] \
--env="USERMAP_UID=500" --env="USERMAP_GID=500" \
sameersbn/redmine:5.1.4
sameersbn/redmine:6.0.1
```

### Available Configuration Parameters
Expand Down Expand Up @@ -771,7 +771,7 @@ To uninstall plugins you need to first tell redmine about the plugin you need to
docker run --name=redmine -it --rm \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4 \
sameersbn/redmine:6.0.1 \
app:rake redmine:plugins:migrate NAME=plugin_name VERSION=0
```

Expand All @@ -789,7 +789,7 @@ For example, to remove the recurring tasks plugin:
docker run --name=redmine -it --rm \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
--volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
sameersbn/redmine:5.1.4 \
sameersbn/redmine:6.0.1 \
app:rake redmine:plugins:migrate NAME=recurring_tasks VERSION=0
rm -rf /srv/docker/redmine/redmine/plugins/recurring_tasks
```
Expand Down Expand Up @@ -869,7 +869,7 @@ Relaunch the container with the `app:backup:create` argument.

```bash
docker run --name redmine -it --rm [OPTIONS] \
sameersbn/redmine:5.1.4 app:backup:create
sameersbn/redmine:6.0.1 app:backup:create
```

The backup will be created in the `backups/` folder of the [Data Store](#data-store). You can change the location using the `REDMINE_BACKUPS_DIR` configuration parameter.
Expand Down Expand Up @@ -900,7 +900,7 @@ Relaunch the container with the `app:backup:restore` argument. Ensure you launch

```bash
docker run --name redmine -it --rm [OPTIONS] \
sameersbn/redmine:5.1.4 app:backup:restore
sameersbn/redmine:6.0.1 app:backup:restore
```

A list of existing backups will be displayed. Select a backup you wish to restore.
Expand All @@ -909,7 +909,7 @@ To avoid this interaction you can specify the backup filename using the `BACKUP`

```bash
docker run --name redmine -it --rm [OPTIONS] \
sameersbn/redmine:5.1.4 app:backup:restore BACKUP=1417624827_redmine_backup.tar
sameersbn/redmine:6.0.1 app:backup:restore BACKUP=1417624827_redmine_backup.tar
```

## Automated backups
Expand All @@ -928,7 +928,7 @@ The `app:rake` command allows you to run redmine rake tasks. To run a rake task

```bash
docker run --name=redmine -d [OPTIONS] \
sameersbn/redmine:5.1.4 app:rake redmine:email:test[admin]
sameersbn/redmine:6.0.1 app:rake redmine:email:test[admin]
```

You can also use `docker exec` to run rake tasks on running redmine instance. For example,
Expand All @@ -941,7 +941,7 @@ Similarly, to remove uploaded files left unattached

```bash
docker run --name=redmine -d [OPTIONS] \
sameersbn/redmine:5.1.4 app:rake redmine:attachments:prune
sameersbn/redmine:6.0.1 app:rake redmine:attachments:prune
```

Or,
Expand All @@ -959,7 +959,7 @@ To upgrade to newer redmine releases, simply follow this 4 step upgrade procedur
- **Step 1**: Update the docker image.

```bash
docker pull sameersbn/redmine:5.1.4
docker pull sameersbn/redmine:6.0.1
```

- **Step 2**: Stop and remove the currently running image
Expand All @@ -981,7 +981,7 @@ Replace `x.x.x` with the version you are upgrading from. For example, if you are
- **Step 4**: Start the image

```bash
docker run --name=redmine -d [OPTIONS] sameersbn/redmine:5.1.4
docker run --name=redmine -d [OPTIONS] sameersbn/redmine:6.0.1
```

When an upgrade is in progress the variable `REDMINE_WAS_UPDATED` will be defined and set to `yes`. This allows easy integration of individual upgrade-steps via `entrypoint.custom.sh`, `pre-install.sh`, and `post-install.sh`.
Expand All @@ -998,13 +998,15 @@ docker exec -it redmine bash

## Upgrading to next redmine release

- Commands to run to update image to next redmine release, examples are from 5.0.4 to 5.1.4
- Commands to run to update image to next redmine release, examples are from 6.0.1 to 6.0.2

```bash
sed -i 's/5.1.3/5.1.4/g' VERSION README.md docker-compose-memcached.yml docker-compose-mysql.yml docker-compose-ssl.yml docker-compose-sqlite3.yml docker-compose-mariadb.yml Dockerfile docker-compose.yml
sed -i 's/6.0.1/6.0.1/g' VERSION README.md docker-compose-memcached.yml docker-compose-mysql.yml docker-compose-ssl.yml docker-compose-sqlite3.yml docker-compose-mariadb.yml Dockerfile docker-compose.yml
vim Changelog.md # Update change log
make test-release # Runs the following
# sudo rm -rf /srv/docker/redmine/ # Clean old run
# sudo mkdir -p /srv/docker/redmine/redmine
# sudo cp -rf $(CERTS_DIR) /srv/docker/redmine/redmine/ # Copy generated certificates
# docker compose down
# docker compose build
# docker compose up # Test new build
Expand All @@ -1017,7 +1019,7 @@ make test-release # Runs the following
```

- Open https://github.com/sameersbn/docker-redmine/releases and Draft new release
- Select tag 5.1.4 and set release title to 5.1.4
- Select tag 6.0.1 and set release title to 6.0.1
- Publish release
- Check https://quay.io/repository/sameersbn/redmine?tab=info and https://hub.docker.com/r/sameersbn/redmine/builds for build progress

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.4
6.0.1
2 changes: 1 addition & 1 deletion assets/runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ install_plugins() {
install_themes() {
if [[ -d ${REDMINE_THEMES_DIR} ]]; then
echo "Installing themes..."
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/public/themes/
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/themes/
fi
}

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:

redmine:
build: ./
image: sameersbn/redmine:5.1.4
image: sameersbn/redmine:6.0.1
depends_on:
- database
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:

redmine:
build: ./
image: sameersbn/redmine:5.1.4
image: sameersbn/redmine:6.0.1
depends_on:
- postgresql
- memcached
Expand Down
15 changes: 8 additions & 7 deletions docker-compose-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
services:
mysql:
image: sameersbn/mysql:5.7.22-1
image: mysql:8.0-bookworm
environment:
- DB_USER=redmine
- DB_PASS=password
- DB_NAME=redmine_production
- MYSQL_CHARSET=utf8mb4
- MYSQL_COLLATION=utf8mb4_unicode_ci
- MYSQL_USER=redmine
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=redmine_production
- MYSQL_RANDOM_ROOT_PASSWORD=yes
volumes:
- /srv/docker/redmine/mysql:/var/lib/mysql
# https://www.redmine.org/projects/redmine/wiki/MySQL_configuration
command: --transaction-isolation=READ-COMMITTED
cap_add:
- SYS_NICE # CAP_SYS_NICE

redmine:
build: ./
image: sameersbn/redmine:5.1.4
image: sameersbn/redmine:6.0.1
depends_on:
- mysql
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-sqlite3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
redmine:
build: ./
image: sameersbn/redmine:5.1.4
image: sameersbn/redmine:6.0.1
environment:
- TZ=Asia/Kolkata

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:

redmine:
build: ./
image: sameersbn/redmine:5.1.4
image: sameersbn/redmine:6.0.1
depends_on:
- postgresql
environment:
Expand Down
Loading
Loading