sameersbn/docker-redmine — pull request #37 by kstange (2014-08-29 21:03:42+00:00)
Title: Add support for SSL

This commit adds support for reading an SSL certificate and redirecting 80 to 443. I did not update any documentation.

I added these ENV options:

NGINX_SSL_ENABLED (defaults false, if true, uses for /home/redmine/data/ssl/redmine.pem and redmine.key)
VHOST_NAME (defaults to $(hostname -f), used it for the nginx redirect)

I added a config file named "redmine-ssl" which includes SSL-specific options. If NGINX_SSL_ENABLED=true, it copies this instead of the normal redmine file.

My docker run command looked something like this:

docker run --name redmine -d -p IP:443:443 -p IP:80:80 -v /opt/redmine/files:/redmine/files -v /opt/redmine/ssl/:/home/redmine/data/ssl -h redmine.domain --env-file=/opt/redmine/ENV kstange/redmine

With ENV looking like this:

DB_HOST=db
DB_NAME=redmine
DB_USER=redmine
DB_PASS=redmine
SMTP_HOST=host
SMTP_PORT=25
SMTP_ENABLED=true
NGINX_SSL_ENABLED=true

I noticed that someone else submitted a pull request to enable SSL in a more complicated way, but I had trouble figuring out how to get his to work, especially because of apparent errors with his documentation updates.