DEV Community

Docker Redmine

Redmine

require

  • database : mysql , postgres , ...

Step Docker Run

Step 1 Install postgres

$ docker run -d --name postgres --network some-network -e POSTGRES_PASSWORD=secret -e POSTGRES_USER=redmine postgres

OR Step 1 Install Mysql

$ docker run -d --name mysql --network some-network -e MYSQL_USER=redmine -e MYSQL_PASSWORD=secret -e MYSQL_DATABASE=redmine -e MYSQL_RANDOM_ROOT_PASSWORD=1 mysql:5.7

Step 2 Install Redmine

docker run -d --name redmine /
--network redmine-network /
-e REDMINE_DB_POSTGRES=postgres /
-e REDMINE_DB_USERNAME=redmine /
-e REDMINE_DB_PASSWORD=secret /
redmine

Step Docker-compose

Mysql

version: '3.1'

services:

  redmine:
    image: redmine
    restart: always
    ports:
      - 8080:3000
    environment:
      REDMINE_DB_MYSQL: db
      REDMINE_DB_PASSWORD: example

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: redmine

Postgres

version: '3.1'

services:

  redmine:
    image: redmine
    restart: always
    ports:
      - 8080:3000
    environment:
      REDMINE_DB_POSTGRES: postgres
      REDMINE_DB_USERNAME: redmine
      REDMINE_DB_PASSWORD: secret

  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: example
      POSTGRES_PASSWORD: redmine

Volume

$ docker run -d --name redmine /
-v /my/own/datadir:/usr/src/redmine/files /
--link postgres:postgres /
redmine

Top comments (0)