Db no longer sidekick, moved all volumes to version 2 method, and added traefic labels

This commit is contained in:
Josh Cox 2017-07-15 19:05:26 -05:00
parent 2508aa9f52
commit 66fe0efae0
2 changed files with 62 additions and 40 deletions

View File

@ -1,38 +1,17 @@
version: '2'
services:
redmine-datavolume:
image: "busybox"
volumes:
- /home/redmine/data
- /var/lib/mysql
- /var/log/redmine
labels:
io.rancher.container.start_once: true
entrypoint: ["/bin/true"]
db:
restart: always
image: mariadb:10.2
volumes_from:
- redmine-datavolume
labels:
io.rancher.sidekicks: redmine-datavolume
io.rancher.container.pull_image: always
environment:
- MYSQL_USER=redmine
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=redmine_production
redmine:
image: sameersbn/redmine:3.3.2-1
labels:
io.rancher.sidekicks: db,redmine-datavolume
io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always
traefik.enable: true
traefik.alias: ${REDMINE_HOST}
traefik.domain: ${REDMINE_DOMAIN}
traefik.acme: true
traefik.port: 80
environment:
- PORT=${PORT}
- PORT=80
- TZ=${TZ}
- DB_PASS=${DB_PASS}
- DB_ADAPTER=mysql2
@ -42,7 +21,25 @@ services:
- REDMINE_SECRET_TOKEN=${REDMINE_SECRET_TOKEN}
- SMTP_ENABLED=false
- IMAP_ENABLED=false
volumes_from:
- redmine-datavolume
ports:
- ${PORT}:80
volumes:
- redminedata:/home/redmine/data
- redminelog:/var/log/redmine
db:
restart: always
image: mariadb:10.2
volumes:
- redminedbdata:/var/lib/mysql
labels:
io.rancher.container.pull_image: always
environment:
- MYSQL_USER=redmine
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=redmine_production
volumes:
redminedata:
driver: ${VOLUME_DRIVER}
redminelog:
driver: ${VOLUME_DRIVER}
redminedbdata:
driver: ${VOLUME_DRIVER}

View File

@ -5,12 +5,18 @@ catalog:
description: |
Redmine
questions:
- variable: "PORT"
description: "external port to access redmine on"
label: "Port"
- variable: "REDMINE_HOST"
description: "Hostname to use for the Redmine"
label: "Thalhalla Store Hostname"
required: true
default: "11080"
type: "int"
default: "redmine"
type: "string"
- variable: "REDMINE_DOMAIN"
description: "Domain to use for the Redmine server"
label: "REDMINE Domain"
required: true
default: ""
type: "string"
- variable: "TZ"
description: "Timezone to use for the server"
label: "Timezone"
@ -21,16 +27,35 @@ catalog:
description: "Database Password to use for the server"
label: "DB Password"
required: true
default: "password123"
type: string
default: ""
type: "password"
- variable: "REDMINE_SECRET_TOKEN"
description: "REDMINE_SECRET_TOKEN"
label: "REDMINE_SECRET_TOKEN"
required: true
default: "REALLYlongrandomhashkjekkckksixci"
type: "string"
default: ""
type: "password"
- variable: "VOLUME_DRIVER"
description: "The VOLUME driver to associate with this server"
label: "VOLUME Driver"
required: true
default: "rancher-nfs"
type: enum
options:
- local
- rancher-nfs
- rancher-efs
- rancher-ebs
services:
redmine:
scale: 1
retain_ip: true
health_check:
healthy_threshold: 2
response_timeout: 5000
port: 80
unhealthy_threshold: 3
interval: 5000
strategy: recreate
request_line: GET / # HTTP/1.0