From 2ef6e46e73cf0b42439f9b156f71184a3c4fa5d8 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 7 Jan 2019 17:00:01 -0500 Subject: [PATCH 1/5] Modified network alias --- templates/Gogs/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Gogs/0/docker-compose.yml b/templates/Gogs/0/docker-compose.yml index 7f454b1..e1cfea5 100644 --- a/templates/Gogs/0/docker-compose.yml +++ b/templates/Gogs/0/docker-compose.yml @@ -67,7 +67,7 @@ services: networks: db-admin: aliases: - - gogs + - gogs-db restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system From 1e594705567a182d87a8a42c3d551bb2751cf84d Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@users.noreply.git.williammiceli.systems> Date: Wed, 6 Feb 2019 20:20:28 -0500 Subject: [PATCH 2/5] Disabled SSH for Traefik --- templates/Gogs/0/docker-compose.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/Gogs/0/docker-compose.yml b/templates/Gogs/0/docker-compose.yml index e1cfea5..107da08 100644 --- a/templates/Gogs/0/docker-compose.yml +++ b/templates/Gogs/0/docker-compose.yml @@ -17,13 +17,13 @@ services: {{- if .Values.TRAEFIK_HOST}} traefik.enable: true ### Start SSH Segment - traefik.ssh.frontend.entryPoints: ssh - traefik.ssh.frontend.headers.forceSTSHeader: true - traefik.ssh.frontend.headers.SSLRedirect: true - traefik.ssh.frontend.headers.STSPreload: true - traefik.ssh.frontend.headers.STSSeconds: 15552000 - traefik.ssh.frontend.rule: Host:${TRAEFIK_HOST} - traefik.ssh.port: "22" + # traefik.ssh.frontend.entryPoints: ssh + # traefik.ssh.frontend.headers.forceSTSHeader: true + # traefik.ssh.frontend.headers.SSLRedirect: true + # traefik.ssh.frontend.headers.STSPreload: true + # traefik.ssh.frontend.headers.STSSeconds: 15552000 + # traefik.ssh.frontend.rule: Host:${TRAEFIK_HOST} + # traefik.ssh.port: "22" ### End SSH Segment ### Start Web Segment traefik.web.frontend.entryPoints: http,https From 9be1a07b8c2e948e7c90390319468b64d0f92163 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@users.noreply.git.williammiceli.systems> Date: Wed, 6 Feb 2019 20:21:45 -0500 Subject: [PATCH 3/5] Removed host ports, not needed --- templates/Gogs/0/docker-compose.yml | 3 --- templates/Gogs/0/rancher-compose.yml | 23 +++-------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/templates/Gogs/0/docker-compose.yml b/templates/Gogs/0/docker-compose.yml index 107da08..96029a6 100644 --- a/templates/Gogs/0/docker-compose.yml +++ b/templates/Gogs/0/docker-compose.yml @@ -41,9 +41,6 @@ services: - mysql networks: - public-proxy - ports: - - "${SSH_PORT}:22" - - "${WEB_PORT}:3000" restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system diff --git a/templates/Gogs/0/rancher-compose.yml b/templates/Gogs/0/rancher-compose.yml index 766476f..d6114a7 100644 --- a/templates/Gogs/0/rancher-compose.yml +++ b/templates/Gogs/0/rancher-compose.yml @@ -20,31 +20,14 @@ catalog: label: "Public Host Domain" description: | The host that Traefik will use to provide public access. - Leaving this empty will disable Traefik on this stack. default: "subdomain.domain.tld" - required: false - type: string - - - variable: "WEB_PORT" - label: "Local Web Port" - description: | - The port to locally access the web interface on. - default: "10500" - required: true - type: string - - - variable: "SSH_PORT" - label: "SSH Port" - description: | - The port to access the SSH server on. - default: "10522" required: true type: string - variable: "DB_ROOT_PASS" - label: "MySQL Root Password" + label: "Database Root Password" description: | - A secure password to be used by the "root" MySQL user. + A secure password to be used by the "root" database user. # default: required: true type: password @@ -52,7 +35,7 @@ catalog: - variable: "DB_USER_PASS" label: "MySQL User Password" description: | - A secure password to be used by the "gogs_user" MySQL user. + A secure password to be used by the "gogs_user" database user. # default: required: true type: password From ab5ea9210c74f488de60da393b78148a2e67ec56 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@users.noreply.git.williammiceli.systems> Date: Wed, 6 Feb 2019 20:23:44 -0500 Subject: [PATCH 4/5] Removed networks, as Rancher doesn't use them, and Traefik is now mandatory --- templates/Gogs/0/docker-compose.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/templates/Gogs/0/docker-compose.yml b/templates/Gogs/0/docker-compose.yml index 96029a6..a4ef702 100644 --- a/templates/Gogs/0/docker-compose.yml +++ b/templates/Gogs/0/docker-compose.yml @@ -14,7 +14,6 @@ services: {{- if .Values.HOST_LABEL}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} - {{- if .Values.TRAEFIK_HOST}} traefik.enable: true ### Start SSH Segment # traefik.ssh.frontend.entryPoints: ssh @@ -34,13 +33,8 @@ services: traefik.web.frontend.rule: Host:${TRAEFIK_HOST} traefik.web.port: "3000" ### End Web Segment - {{- else}} - traefik.enable: false - {{- end}} links: - mysql - networks: - - public-proxy restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system @@ -52,7 +46,7 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - MYSQL_DATABASE: gogs # Will eventually rename this to "gogs_db" + MYSQL_DATABASE: gogs_db MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} MYSQL_USER: gogs_user MYSQL_PASSWORD: ${DB_USER_PASS} @@ -61,18 +55,8 @@ services: {{- if .Values.HOST_LABEL}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} - networks: - db-admin: - aliases: - - gogs-db restart: on-failure 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 - - /RancherCattle/${DATA_DIR}/Database:/var/lib/mysql - -networks: - db-admin: - external: true - public-proxy: - external: true \ No newline at end of file + - /RancherCattle/${DATA_DIR}/Database:/var/lib/mysql \ No newline at end of file From 794f59fec867ad4a987a2cb6fdaabc2a64bd4e07 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@users.noreply.git.williammiceli.systems> Date: Wed, 6 Feb 2019 20:25:07 -0500 Subject: [PATCH 5/5] Removed unneeded service scales --- templates/Gogs/0/rancher-compose.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/templates/Gogs/0/rancher-compose.yml b/templates/Gogs/0/rancher-compose.yml index d6114a7..6948698 100644 --- a/templates/Gogs/0/rancher-compose.yml +++ b/templates/Gogs/0/rancher-compose.yml @@ -46,10 +46,4 @@ catalog: The directory to store persistent data for the stack. default: "Personal/Gogs" required: true - type: string - -services: - gogs: - scale: 1 - mysql: - scale: 1 \ No newline at end of file + type: string \ No newline at end of file