From 6ea6a0d92ae5d922f1c54ba5355ec6ab564a6c1b Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 14:46:46 -0500 Subject: [PATCH 1/5] Added official image link --- templates/RocketChat/0/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/RocketChat/0/README.md b/templates/RocketChat/0/README.md index 19e1e10..b6adb64 100644 --- a/templates/RocketChat/0/README.md +++ b/templates/RocketChat/0/README.md @@ -1 +1,3 @@ -# RocketChat \ No newline at end of file +# RocketChat + +https://store.docker.com/_/rocketchat \ No newline at end of file From 0c26598d8783ae4ea855cb20c0295601fadd250f Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 8 Feb 2019 23:21:00 -0500 Subject: [PATCH 2/5] WIP: Most needed configuration added --- templates/RocketChat/0/docker-compose.yml | 114 +++++++++++++++------- 1 file changed, 79 insertions(+), 35 deletions(-) diff --git a/templates/RocketChat/0/docker-compose.yml b/templates/RocketChat/0/docker-compose.yml index 0c8d82d..4749339 100644 --- a/templates/RocketChat/0/docker-compose.yml +++ b/templates/RocketChat/0/docker-compose.yml @@ -1,36 +1,80 @@ -mongo: - image: mongo -# volumes: -# - ./data/runtime/db:/data/db -# - ./data/dump:/dump - command: mongod --smallfiles --oplogSize 128 +version: '2' -rocketchat: - image: rocketchat/rocket.chat:latest -# volumes: -# - ./uploads:/app/uploads - environment: - - PORT=3000 - - ROOT_URL=http://yourhost:3000 - - MONGO_URL=mongodb://mongo:27017/rocketchat - links: - - mongo:mongo - ports: - - 3000:3000 - -# hubot, the popular chatbot (add the bot user first and change the password before starting this image) -hubot: - image: rocketchat/hubot-rocketchat - environment: - - ROCKETCHAT_URL=rocketchat:3000 - - ROCKETCHAT_ROOM=GENERAL - - ROCKETCHAT_USER=bot - - ROCKETCHAT_PASSWORD=botpassword - - BOT_NAME=bot -# you can add more scripts as you'd like here, they need to be installable by npm - - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics - links: - - rocketchat:rocketchat -# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier - ports: - - 3001:8080 \ No newline at end of file +services: + hubot: + image: rocketchat/hubot-rocketchat:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + environment: + ROCKETCHAT_URL: ${TRAEFIK_HOST} + ROCKETCHAT_ROOM: GENERAL + ROCKETCHAT_USER: Hubot + ROCKETCHAT_PASSWORD: BotPassw0rd + BOT_NAME: Hubot + EXTERNAL_SCRIPTS: hubot-help,hubot-seen,hubot-links,hubot-greetings + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: true + ### Start Hubot Segment + traefik.hubot.frontend.entryPoints: http,https + traefik.hubot.frontend.headers.forceSTSHeader: true + traefik.hubot.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.hubot.frontend.headers.SSLRedirect: true + traefik.hubot.frontend.headers.STSPreload: true + traefik.hubot.frontend.headers.STSSeconds: 15552000 + traefik.hubot.frontend.passHostHeader: true + traefik.hubot.frontend.rule: Host:${TRAEFIK_HOST} + traefik.hubot.port: "8080" + ### End Hubot Segment + links: + - rocketchat:rocketchat + # this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier + ports: + - 3001:8080 + mongo: + image: mongo:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: false + volumes: + - ./data/runtime/db:/data/db + - ./data/dump:/dump + command: mongod --smallfiles + rocketchat: + image: rocketchat/rocket.chat:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + environment: + MONGO_URL: mongodb://mongo:27017/rocketchat + ROOT_URL: https://chat.inumio.com + Accounts_UseDNSDomainCheck: true + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: true + ### Start RocketChat Segment + traefik.rocketchat.frontend.entryPoints: http,https + traefik.rocketchat.frontend.headers.forceSTSHeader: true + traefik.rocketchat.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.rocketchat.frontend.headers.SSLRedirect: true + traefik.rocketchat.frontend.headers.STSPreload: true + traefik.rocketchat.frontend.headers.STSSeconds: 15552000 + traefik.rocketchat.frontend.passHostHeader: true + traefik.rocketchat.frontend.rule: Host:${TRAEFIK_HOST} + traefik.rocketchat.port: "3000" + ### End RocketChat Segment + links: + - mongo:mongo \ No newline at end of file From f74db4da214ed5d1099fb53feaf43514cc30614d Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 8 Feb 2019 23:39:06 -0500 Subject: [PATCH 3/5] WIP: Changed ROOT_URL --- templates/RocketChat/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/RocketChat/0/docker-compose.yml b/templates/RocketChat/0/docker-compose.yml index 4749339..4e68348 100644 --- a/templates/RocketChat/0/docker-compose.yml +++ b/templates/RocketChat/0/docker-compose.yml @@ -57,7 +57,7 @@ services: - 1.0.0.1 environment: MONGO_URL: mongodb://mongo:27017/rocketchat - ROOT_URL: https://chat.inumio.com + ROOT_URL: https://${TRAEFIK_HOST} Accounts_UseDNSDomainCheck: true labels: io.rancher.container.pull_image: always From 4b2d99d29ddb5176753bfb91fa2112cdf5ff290b Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 9 Feb 2019 12:53:55 -0500 Subject: [PATCH 4/5] Testing finished configuration --- templates/RocketChat/0/docker-compose.yml | 9 +++----- templates/RocketChat/0/rancher-compose.yml | 25 ++++++++++++++++++++-- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/templates/RocketChat/0/docker-compose.yml b/templates/RocketChat/0/docker-compose.yml index 4e68348..439514f 100644 --- a/templates/RocketChat/0/docker-compose.yml +++ b/templates/RocketChat/0/docker-compose.yml @@ -7,7 +7,7 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - ROCKETCHAT_URL: ${TRAEFIK_HOST} + ROCKETCHAT_URL: hubot.${TRAEFIK_HOST} ROCKETCHAT_ROOM: GENERAL ROCKETCHAT_USER: Hubot ROCKETCHAT_PASSWORD: BotPassw0rd @@ -32,9 +32,6 @@ services: ### End Hubot Segment links: - rocketchat:rocketchat - # this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier - ports: - - 3001:8080 mongo: image: mongo:latest dns: # Using Cloudflare DNS @@ -47,8 +44,8 @@ services: {{- end}} traefik.enable: false volumes: - - ./data/runtime/db:/data/db - - ./data/dump:/dump + - /RancherCattle/${DATA_DIR}/Database/Data:/data/db + - /RancherCattle/${DATA_DIR}/Database/Dump:/dump command: mongod --smallfiles rocketchat: image: rocketchat/rocket.chat:latest diff --git a/templates/RocketChat/0/rancher-compose.yml b/templates/RocketChat/0/rancher-compose.yml index 44d65d9..f425f50 100644 --- a/templates/RocketChat/0/rancher-compose.yml +++ b/templates/RocketChat/0/rancher-compose.yml @@ -6,7 +6,28 @@ catalog: # minimum_rancher_version: # maximum_rancher_version: # upgrade_from: - uuid: rocketchat-0 questions: -rocketchat: \ No newline at end of file + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Label Key/Value pair of the host which containers should be deployed + default: "host.id=Host1" + required: false + type: string + + - variable: "TRAEFIK_HOST" + label: "Public Host Domain" + description: | + The host that Traefik will use to provide public access. + default: "subdomain.domain.tld" + required: true + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/RocketChat" + required: true + type: string \ No newline at end of file From 8cd6eab3466872639f16d03ff0042ee5655275a4 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 9 Feb 2019 12:54:59 -0500 Subject: [PATCH 5/5] Default to latest version --- templates/RocketChat/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/RocketChat/config.yml b/templates/RocketChat/config.yml index 5645207..24576cb 100644 --- a/templates/RocketChat/config.yml +++ b/templates/RocketChat/config.yml @@ -1,7 +1,7 @@ name: RocketChat description: | Status: NOT READY -# version: +version: latest category: Communication maintainer: WilliamMiceli # license: