85 lines
3.0 KiB
YAML
85 lines
3.0 KiB
YAML
# Redmine (optionally with LDAP authentication) with MariaDB.
|
|
#
|
|
services:
|
|
# https://hub.docker.com/_/redmine
|
|
# https://github.com/docker-library/redmine
|
|
# https://github.com/redmine/redmine
|
|
redmine:
|
|
image: redmine:6
|
|
# Database must be accessible.
|
|
depends_on:
|
|
database:
|
|
condition: service_started
|
|
# Below you may find a possible solution if you also need to install some of the plugins'
|
|
# opsys dependencies. We don't want to extend the official image to maintain watchtower's
|
|
# monitoring for updates. So we use CMD to make all the necessary changes.
|
|
# This will slightly prolong the start of the service.
|
|
# command:
|
|
# - /bin/bash
|
|
# - -c
|
|
# - |
|
|
# DEBIAN_FRONTEND=noninteractive apt update
|
|
# apt install -y --no-install-recommends build-essential zlib1g-dev
|
|
# apt clean
|
|
# rm -rf /var/lib/apt/lists/*
|
|
# source /docker-entrypoint.sh rails server -b 0.0.0.0
|
|
|
|
restart: unless-stopped
|
|
# Take a look the possible public port collision.
|
|
ports:
|
|
- 8201:3000
|
|
links:
|
|
- database
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
# The entrypoint script sets chown 999:999 and chmod 755/644 to these below.
|
|
# https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Step-8-File-system-permissions
|
|
- ./storage/volumes/redmine_files:/usr/src/redmine/files
|
|
- ./configs/configuration.yml:/usr/src/redmine/config/configuration.yml
|
|
- ./configs/database.yml:/usr/src/redmine/config/database.yml
|
|
# Needs read UID 999.
|
|
- ./storage/volumes/redmine_plugins:/usr/src/redmine/plugins
|
|
environment:
|
|
REDMINE_DB_MYSQL: database
|
|
REDMINE_DB_DATABASE: redmine
|
|
REDMINE_DB_USERNAME: redmine
|
|
# Same as MYSQL_PASSWORD below.
|
|
REDMINE_DB_PASSWORD: secret-1
|
|
# Only if you want to disable internal DB version updates.
|
|
#REDMINE_NO_DB_MIGRATE: 'yes'
|
|
# Automatically follows DB version updates related to the plugins.
|
|
REDMINE_PLUGINS_MIGRATE: 'yes'
|
|
# https://www.avast.com/random-password-generator
|
|
REDMINE_SECRET_KEY_BASE: secret-3
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: true
|
|
#
|
|
# https://hub.docker.com/_/mariadb
|
|
database:
|
|
image: mariadb:lts
|
|
restart: unless-stopped
|
|
# Only for migration or debugging.
|
|
#ports:
|
|
# - 3306:3306
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
# Needs R/W UID:GID 999:999.
|
|
- ./storage/volumes/mysql:/var/lib/mysql
|
|
# Needs read UID 999.
|
|
- ./storage/volumes/mysql_conf_d:/etc/mysql/conf.d:ro
|
|
- ./storage/volumes/mysql_init_d:/docker-entrypoint-initdb.d:ro
|
|
environment:
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
MARIADB_INITDB_SKIP_TZINFO: "1"
|
|
MYSQL_DATABASE: redmine
|
|
MYSQL_USER: redmine
|
|
# https://www.avast.com/random-password-generator
|
|
MYSQL_PASSWORD: secret-1
|
|
MYSQL_ROOT_PASSWORD: secret-2
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: true
|