From 618cd26242b93e510d3ed2b8b8a3cf0c70ed575d Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 9 Feb 2019 12:32:26 -0500 Subject: [PATCH] WIP: Most elements added --- templates/Mongo/0/README.md | 5 +++ templates/Mongo/0/docker-compose.yml | 34 ++++++++++++++++++++ templates/Mongo/0/rancher-compose.yml | 45 +++++++++++++++++++++++++++ templates/Mongo/config.yml | 8 +++++ 4 files changed, 92 insertions(+) create mode 100644 templates/Mongo/0/README.md create mode 100644 templates/Mongo/0/docker-compose.yml create mode 100644 templates/Mongo/0/rancher-compose.yml create mode 100644 templates/Mongo/config.yml diff --git a/templates/Mongo/0/README.md b/templates/Mongo/0/README.md new file mode 100644 index 0000000..5ae3faf --- /dev/null +++ b/templates/Mongo/0/README.md @@ -0,0 +1,5 @@ +# Redis + +### Will continue this in the future + +https://store.docker.com/_/redis \ No newline at end of file diff --git a/templates/Mongo/0/docker-compose.yml b/templates/Mongo/0/docker-compose.yml new file mode 100644 index 0000000..171eb30 --- /dev/null +++ b/templates/Mongo/0/docker-compose.yml @@ -0,0 +1,34 @@ +version: '2' + +services: + mongo: + image: mongo:${IMAGE_TAG} + 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 + restart: on-failure + stdin_open: true + tty: true + volumes: + - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system + - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system + {{- if .Values.DATA_DIR}} + {{- if eq .Values.CUSTOM_CONF "true"}} + - /RancherCattle/${DATA_DIR}/Configuration:/etc/mongo + {{- end}} + - /RancherCattle/${DATA_DIR}/Data:/data/db + {{- end}} + mongo-express: + image: mongo-express + restart: always + ports: + - 8081:8081 + environment: + ME_CONFIG_MONGODB_ADMINUSERNAME: root + ME_CONFIG_MONGODB_ADMINPASSWORD: example \ No newline at end of file diff --git a/templates/Mongo/0/rancher-compose.yml b/templates/Mongo/0/rancher-compose.yml new file mode 100644 index 0000000..0c24d37 --- /dev/null +++ b/templates/Mongo/0/rancher-compose.yml @@ -0,0 +1,45 @@ +version: '2' +catalog: + name: Mongo + version: latest + # description: + # minimum_rancher_version: + # maximum_rancher_version: + # upgrade_from: + # uuid: + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Key/Value pair on the host which the stack should be deployed. + default: "host.id=Host1" + required: false + type: string + + - variable: "IMAGE_TAG" + label: "Image Tag" + description: | + The image tag to use for the desired container variant. + default: "latest" + required: true + type: enum + options: + - "latest" + + - variable: "CUSTOM_CONF" + label: "Custom Configuration" + description: | + Whether a custom configuration file should be mounted from the persistent data directory or not. Data Directory is required for this. + default: false + required: true + type: boolean + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + Leaving this blank will disable persistent data storage for the stack. + default: "Personal/Mongo" + required: false + type: string diff --git a/templates/Mongo/config.yml b/templates/Mongo/config.yml new file mode 100644 index 0000000..4559ad2 --- /dev/null +++ b/templates/Mongo/config.yml @@ -0,0 +1,8 @@ +name: Mongo +description: | + MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemata. +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file