From 41a85f72daa2099087c9c81611e5f2c4a7060b8e Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:06:57 -0500 Subject: [PATCH 01/13] Enabled debug mode --- templates/Snipe-IT/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 91a856b..6989c2e 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -10,7 +10,7 @@ services: - 1.0.0.1 environment: APP_ENV: production - APP_DEBUG: false + APP_DEBUG: true {{- if .Values.TRAEFIK_HOST}} APP_URL: https://${TRAEFIK_HOST} {{- else}} From 69a99043106711b045716b1675345aa1c48cab8f Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:09:14 -0500 Subject: [PATCH 02/13] Downgraded environment --- templates/Snipe-IT/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 6989c2e..c52b5d3 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -9,7 +9,7 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - APP_ENV: production + APP_ENV: development # "development" or "production" APP_DEBUG: true {{- if .Values.TRAEFIK_HOST}} APP_URL: https://${TRAEFIK_HOST} From 3353a63c94c90317ec6f8e3e3be78bf00ce97523 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:27:58 -0500 Subject: [PATCH 03/13] Changed database and user name --- templates/Snipe-IT/0/docker-compose.yml | 8 ++++---- templates/Snipe-IT/0/rancher-compose.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index c52b5d3..b7afc9c 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -18,8 +18,8 @@ services: {{- end}} APP_KEY: ${APP_KEY} MYSQL_HOST: mysql - MYSQL_DATABASE: snipeit - MYSQL_USER: snipe_user + MYSQL_DATABASE: snipeit_db + MYSQL_USER: snipeit_user MYSQL_PASSWORD: ${DB_USER_PASS} labels: io.rancher.container.pull_image: always @@ -62,9 +62,9 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - MYSQL_DATABASE: snipeit + MYSQL_DATABASE: snipeit_db MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} - MYSQL_USER: snipe_user + MYSQL_USER: snipeit_user MYSQL_PASSWORD: ${DB_USER_PASS} labels: io.rancher.container.pull_image: always diff --git a/templates/Snipe-IT/0/rancher-compose.yml b/templates/Snipe-IT/0/rancher-compose.yml index 05a87e5..984c242 100644 --- a/templates/Snipe-IT/0/rancher-compose.yml +++ b/templates/Snipe-IT/0/rancher-compose.yml @@ -53,7 +53,7 @@ catalog: - variable: "DB_USER_PASS" label: "MySQL User Password" description: | - A secure password to be used by the "snipe_user" MySQL user. + A secure password to be used by the "snipeit_user" MySQL user. # default: required: true type: password From 69643cf5f3840a963e5f48e927f9944a0e9bda44 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:28:14 -0500 Subject: [PATCH 04/13] Updated Encryption Key description for later --- templates/Snipe-IT/0/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/rancher-compose.yml b/templates/Snipe-IT/0/rancher-compose.yml index 984c242..9b8ec41 100644 --- a/templates/Snipe-IT/0/rancher-compose.yml +++ b/templates/Snipe-IT/0/rancher-compose.yml @@ -61,6 +61,6 @@ catalog: - variable: "APP_KEY" label: "Encryption Key" description: | - A random 32-Character string which will be used for encryption. + See README. required: true type: password \ No newline at end of file From ebb534908a4bd25e2c582757b0abdb6b76c4d4e3 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:28:25 -0500 Subject: [PATCH 05/13] Removed unneeded header --- templates/Snipe-IT/0/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index b7afc9c..683e7ac 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -33,7 +33,6 @@ services: traefik.frontend.headers.forceSTSHeader: true traefik.frontend.headers.SSLRedirect: true traefik.frontend.headers.STSPreload: true - traefik.frontend.headers.SSLProxyHeaders: X-Forwarded-Proto:https traefik.frontend.headers.STSSeconds: 15552000 traefik.port: "80" {{- else}} From 812afe1511feafe64482e430edf3cfa6c8938fe4 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:29:37 -0500 Subject: [PATCH 06/13] Added db-admin network to mysql service --- templates/Snipe-IT/0/docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 683e7ac..3d2c061 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -70,6 +70,10 @@ services: {{- if (.Values.HOST_LABEL)}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} + networks: + db-admin: + aliases: + - snipe-it restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system @@ -77,5 +81,7 @@ services: - /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql networks: + db-admin: + external: true public-proxy: external: true \ No newline at end of file From e8667b552a8d6f13bdc5ad3de9d8fd45b0e28dab Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 20:48:55 -0500 Subject: [PATCH 07/13] Added comment about external access using hostname --- templates/Snipe-IT/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 3d2c061..98f468a 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -73,7 +73,7 @@ services: networks: db-admin: aliases: - - snipe-it + - snipe-it # This should allow access from "mysql.snipe-it.rancher.internal" restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system From 91e28906759d0fe3406277c57038bdeb2bee4fa2 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:13:43 -0500 Subject: [PATCH 08/13] Added small bit of info about upgrading --- templates/Snipe-IT/0/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/README.md b/templates/Snipe-IT/0/README.md index 50931e0..b575cf8 100644 --- a/templates/Snipe-IT/0/README.md +++ b/templates/Snipe-IT/0/README.md @@ -4,4 +4,8 @@ ### Generate Your App Key Using: `php artisan key:generate` -https://snipe-it.readme.io/docs/generate-your-app-key \ No newline at end of file +https://snipe-it.readme.io/docs/generate-your-app-key + + +### After upgrading to a later version, use: +`php artisan migrate` \ No newline at end of file From 5ed01f7645676917b4c53054711459a75e006026 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:16:54 -0500 Subject: [PATCH 09/13] Back to production and added some comments --- templates/Snipe-IT/0/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 98f468a..98b2ad9 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -9,10 +9,10 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - APP_ENV: development # "development" or "production" - APP_DEBUG: true + APP_ENV: production # "development" or "production" + APP_DEBUG: false {{- if .Values.TRAEFIK_HOST}} - APP_URL: https://${TRAEFIK_HOST} + APP_URL: https://${TRAEFIK_HOST} # No port number needed {{- else}} APP_URL: http://localhost {{- end}} From b561066946ab32d5057797dd780f6a13ac64cb9e Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:17:10 -0500 Subject: [PATCH 10/13] Added comments about disabling local access --- templates/Snipe-IT/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 98b2ad9..c9bac60 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -42,7 +42,7 @@ services: - mysql networks: - public-proxy - {{- if .Values.WEB_PORT}} + {{- if .Values.WEB_PORT}} # Allows for local access to be disabled ports: - "${WEB_PORT}:80" {{- else}} From 8f3daa003fd760ce8abc5a31b1aa80d1e4efdda4 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:17:21 -0500 Subject: [PATCH 11/13] Testing over port 443 --- templates/Snipe-IT/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index c9bac60..37c5530 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -34,7 +34,7 @@ services: traefik.frontend.headers.SSLRedirect: true traefik.frontend.headers.STSPreload: true traefik.frontend.headers.STSSeconds: 15552000 - traefik.port: "80" + traefik.port: "443" {{- else}} traefik.enable: false {{- end}} From 3ab0bfb3bece54317db54cea1d7953aa928bcad5 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:24:25 -0500 Subject: [PATCH 12/13] Added passTLSCert label, use port 80 and reordered labels --- templates/Snipe-IT/0/docker-compose.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 37c5530..da0a6df 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -28,13 +28,16 @@ services: {{- end}} {{- if .Values.TRAEFIK_HOST}} traefik.enable: true - traefik.frontend.rule: Host:${TRAEFIK_HOST} - traefik.frontend.entryPoints: http,https - traefik.frontend.headers.forceSTSHeader: true - traefik.frontend.headers.SSLRedirect: true - traefik.frontend.headers.STSPreload: true - traefik.frontend.headers.STSSeconds: 15552000 - traefik.port: "443" + ### Start Web Segment + traefik.web.frontend.entryPoints: http,https + traefik.web.frontend.headers.forceSTSHeader: true + traefik.web.frontend.headers.SSLRedirect: true + traefik.web.frontend.headers.STSPreload: true + traefik.web.frontend.headers.STSSeconds: 15552000 + traefik.web.frontend.passTLSCert: true + traefik.web.frontend.rule: Host:${TRAEFIK_HOST} + traefik.web.port: "80" + ### End Web Segment {{- else}} traefik.enable: false {{- end}} From 9dd6724cb13d7352bba00a323d9101f69cea8ed9 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 21:30:07 -0500 Subject: [PATCH 13/13] Removed passTLSCert label --- templates/Snipe-IT/0/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index da0a6df..abae525 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -34,7 +34,6 @@ services: traefik.web.frontend.headers.SSLRedirect: true traefik.web.frontend.headers.STSPreload: true traefik.web.frontend.headers.STSSeconds: 15552000 - traefik.web.frontend.passTLSCert: true traefik.web.frontend.rule: Host:${TRAEFIK_HOST} traefik.web.port: "80" ### End Web Segment