Coder Social home page Coder Social logo

docker-redmine's Introduction

Introduction

This repository contains Docker Build files for a Redmine application image.

Main features of this image are:

  • Lean image, Redmine Application served with Puma
  • Image is based on Ruby Official Docker Image
  • Ruby: 2.1.5
  • Redmine: 2.6.1
  • Posgtresql: pg gem ~0.17
  • Puma: 2.11
  • Links to a PostgreSQL container
  • Postgresql: Tested with 9.1

Tested on:

  • Docker 1.4.1
  • Boot2docker 1.4.1

It is best linked to a PostgreSQL database container. For ease of use, It has been tested with sameersbn/postgresql image.

Inception and History

On January 25th 2015, I decided to put together a lean redmine container that will use memory less than 300MB. This is the experimentation repository. Currently, This container uses less than 120MB on a boot2docker VM. Linked Postgresql container uses less than 50MB on the same machine.

When putting together pieces of this image, I have referenced sameersbn/redmine image a lot. This image does not even try to be compatible with it and has a reduced feature set.

Usage

You can easily use this image from hub.docker.com. TODO http link

PostgreSQL

In order to run redmine, these environment variables are given to the container:

  • DB_USER=redmine
  • DB_PASS=redminepass
  • DB_NAME=redmine_production

This is the command to start PostgreSQL container interactively:

docker run -ti --name postgresql_1 \
  -e DB_USER=redmine \
  -e DB_PASS=redminepass \
  -e DB_NAME=redmine_production \
  -v /mnt/sda1/opt/postgresql/data:/var/lib/postgresql \
  sameersbn/postgresql:9.1-1

Hit Ctrl+C to stop the container.

This will open /opt/postgresql/data folder on boot2docker for DB persistence.

To start the container again, use:

docker start -ai postgresql_1

Environment Variables

In order to configure, you should provide these environment variables:

  • REDMINE_RELATIVE_URL_ROOT=redmine If given, you can reach with sub url such as http://boot2docker_ip:container_port/redmine

In order Redmine to mail via Gmail account these should be defined:

Running Redmine Container

docker run -ti --name redmine_1 \
-e REDMINE_RELATIVE_URL_ROOT=redmine \
-e SMTP_USER="[email protected]" \
-e SMTP_PASS="plain_password_here" \
-e SMTP_STARTTLS=true \
-v /mnt/sda1/opt/redmine/data:/data \
--link postgresql_1:postgresql \
-P \
myukselen/redmine:2.6.1

Hit Ctrl+C to exit.

Run this to start again:

docker start -ai redmine_1

Redmine Plugin Support

You can mount a data directory for Redmine to store uploaded files. You can also place Redmine Plugins inside plugins folder in unzipped form. Container start script will check for removed and installed plugins. Please look into the scripts running.

Docker Composer file

postgresql:
  image: sameersbn/postgresql:9.1-1
  environment:
    - DB_USER=redmine
    - DB_PASS=redminepass
    - DB_NAME=redmine_production
  volumes:
    - /mnt/sda1/opt/postgresql/data:/var/lib/postgresql

redmine:
  image: myukselen/redmine:2.6.1
  links:
    - postgresql:postgresql
  environment:
    - REDMINE_RELATIVE_URL_ROOT=redmine
    - SMTP_ENABLED=true
    - SMTP_USER "[email protected]"
    - SMTP_PASS "plain_password_here"
    - SMTP_STARTTLS=true
  volumes:
    - /mnt/sda1/opt/redmine/data:/data
  ports:
    - "3000"

Development

This section contains personal notes on how to develop and test the image. You will need to change parameters according to yourself.

Preparation

Before build please download redmine distribution for version 2.6.1 as tar.gz file and place it under setup directory.

PostgreSQL Image

Run as described in usage section.

Build

docker build --tag=myukselen/redmine:2.6.1 .

Run a disposable container for testing

docker run -ti --name redmine_1 \
-e REDMINE_RELATIVE_URL_ROOT=redmine \
-e SMTP_USER="[email protected]" \
-e SMTP_PASS="plain_password_here" \
-e SMTP_STARTTLS=true \
-v /Users/murat/WORK/20150125_redmine_puma/redmine_data:/data \
--link postgresql_1:postgresql \
-P \
myukselen/redmine:2.6.1

Notice that boot2docker mounts /Users for you into the VM. This is why I give my home directory for development.

Access again:

docker exec -ti mrtest bash

Troubleshoot a Docker build failure

You can check the state for a broken build by executing bash inside the last image. For example:

docker run --rm -ti 7970fe5aece7 bash

References

docker-redmine's People

Contributors

myukselen avatar

Watchers

 avatar  avatar

Forkers

color-of-code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.