From 868d7a4ce2478a8a3f2fa1030a5b5aa4ce48e41b Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 13 Sep 2019 18:35:33 -0400 Subject: [PATCH] No way this is going to work first-time, but... YOLO. --- templates/Traefik/1/README.md | 2 ++ templates/Traefik/1/docker-compose.yml | 37 +++++++++++++++++++++++++ templates/Traefik/1/rancher-compose.yml | 34 +++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 templates/Traefik/1/README.md create mode 100644 templates/Traefik/1/docker-compose.yml create mode 100644 templates/Traefik/1/rancher-compose.yml diff --git a/templates/Traefik/1/README.md b/templates/Traefik/1/README.md new file mode 100644 index 0000000..e058b59 --- /dev/null +++ b/templates/Traefik/1/README.md @@ -0,0 +1,2 @@ +# Traefik +### Version: 2.0 diff --git a/templates/Traefik/1/docker-compose.yml b/templates/Traefik/1/docker-compose.yml new file mode 100644 index 0000000..5e20a7f --- /dev/null +++ b/templates/Traefik/1/docker-compose.yml @@ -0,0 +1,37 @@ +version: '2' + +services: + traefik: + image: traefik:2.0-alpine + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + TRAEFIK_API: true # Enable API/Dashboard (Default: false) + TRAEFIK_API_DASHBOARD: true # Activate dashboard (Default: true) + TRAEFIK_API_INSECURE: false # Activate API directly on the entryPoint named traefik (Default: false) + labels: + io.rancher.container.agent.role: environment + io.rancher.container.create_agent: true + io.rancher.container.pull_image: always + {{- if (.Values.HOST_LABEL)}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + ports: + - "${DASHBOARD_PORT}:8080" # Traefik Dashboard + - "22:22" # SSH + - #"80:80" # HTTP + - #"443:443" # HTTPS + - "3306:3306" # MySQL + - "19132:19132" # Minecraft + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - /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 + - /Persistent/${DATA_DIR}/Configuration/traefik.toml:/traefik.toml + - /Persistent/${DATA_DIR}/FileProviders:/FileProviders + - /Persistent/${DATA_DIR}/LetsEncrypt:/letsencrypt # For Let's Encrypt certificates + - /Persistent/${DATA_DIR}/Logs:/external/logs \ No newline at end of file diff --git a/templates/Traefik/1/rancher-compose.yml b/templates/Traefik/1/rancher-compose.yml new file mode 100644 index 0000000..c8076b8 --- /dev/null +++ b/templates/Traefik/1/rancher-compose.yml @@ -0,0 +1,34 @@ +version: '2' +catalog: + name: traefik + version: 2.0 + # description: + # minimum_rancher_version: + # maximum_rancher_version: + # upgrade_from: + # uuid: traefik-0 + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Key/Value pair of the host which the stack should be deployed. + default: "host.id=Proxy1" + required: false + type: string + + - variable: "DASHBOARD_PORT" + label: "Dashboard Port" + description: | + The port to access the dashboard interface on. + default: "10" + required: true + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The persistent data directory. + default: "Personal/Traefik" + required: true + type: string \ No newline at end of file