From b437d74487ed94b5d98aeb8854f76a5327a17d0f Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 17 Nov 2018 17:49:22 -0500 Subject: [PATCH 1/4] Updated to current setup template --- templates/SnipeIT/0/docker-compose.yml | 23 +++++-------- templates/SnipeIT/0/rancher-compose.yml | 44 +++++++------------------ 2 files changed, 19 insertions(+), 48 deletions(-) diff --git a/templates/SnipeIT/0/docker-compose.yml b/templates/SnipeIT/0/docker-compose.yml index dc962c1..ee4aa0a 100644 --- a/templates/SnipeIT/0/docker-compose.yml +++ b/templates/SnipeIT/0/docker-compose.yml @@ -9,9 +9,9 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - APP_ENV: production + # APP_ENV: production APP_DEBUG: true - APP_URL: ${URL}:${HOST_HTTP_PORT} + APP_URL: ${URL}:${WEB_PORT} APP_KEY: ${APP_KEY} MYSQL_HOST: mysql MYSQL_DATABASE: snipeit @@ -20,18 +20,16 @@ services: APP_ENV: labels: io.rancher.container.pull_image: always - {{- if (.Values.HOST_LABEL)}} + {{- if .Values.HOST_LABEL}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} - networks: - - default - - snipe-net + links: + - mysql ports: - - "${HOST_HTTP_PORT}:80" - - "${HOST_HTTPS_PORT}:443" + - "${WEB_PORT}:80" restart: on-failure volumes: - - ${STORAGE_BASE_DIR}${APP_DIR}:/var/lib/snipeit + - /RancherCattleData/${DATA_DIR}/Application:/var/lib/snipeit mysql: image: mysql:5 dns: @@ -47,11 +45,6 @@ services: {{- if (.Values.HOST_LABEL)}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} - networks: - - snipe-net restart: on-failure volumes: - - ${STORAGE_BASE_DIR}${DB_DIR}:/var/lib/mysql - -networks: - snipe-net: \ No newline at end of file + - /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql \ No newline at end of file diff --git a/templates/SnipeIT/0/rancher-compose.yml b/templates/SnipeIT/0/rancher-compose.yml index 9326ac1..e4d0e0c 100644 --- a/templates/SnipeIT/0/rancher-compose.yml +++ b/templates/SnipeIT/0/rancher-compose.yml @@ -11,7 +11,7 @@ catalog: - variable: "HOST_LABEL" label: "Host Label Key/Value Pair" description: | - The Label Key/Value pair on the host which InvoiceNinja should be deployed + The Label Key/Value pair on the host which containers should be deployed default: "host.id=Host1" required: false type: string @@ -24,43 +24,19 @@ catalog: required: true type: string - - variable: "HOST_HTTP_PORT" - label: "Host HTTP Port" + - variable: "WEB_PORT" + label: "Local Web Port" description: | - The HTTP port to access the web interface on. - default: "12000" + The port to locally access the web interface on. + default: "10300" required: true type: string - - variable: "HOST_HTTPS_PORT" - label: "Host HTTPS Port" + - variable: "DATA_DIR" + label: "Data Directory" description: | - The HTTPS port to access the web interface on. - default: "12500" - required: true - type: string - - - variable: "STORAGE_BASE_DIR" - label: "Base Storage Directory" - description: | - The base path of where persistent storage should be kept at. - default: "/RancherStorage/SnipeIT" - required: true - type: string - - - variable: "APP_DIR" - label: "Application Directory" - description: | - The folder for persistent application files. - default: "/Application" - required: true - type: string - - - variable: "DB_DIR" - label: "Database Directory" - description: | - The folder for persistent database files. - default: "/Database" + The directory to store persistent data for the stack. + default: "Personal/Snipe-IT" required: true type: string @@ -68,6 +44,7 @@ catalog: label: "MySQL Root Password" description: | A secure password to be used by the "root" MySQL user. + # default: required: true type: password @@ -75,6 +52,7 @@ catalog: label: "MySQL User Password" description: | A secure password to be used by the "snipe_user" MySQL user. + # default: required: true type: password From a58c5f57710ca06afd9e0d15cdbecc5b1b7b562d Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 17 Nov 2018 17:58:21 -0500 Subject: [PATCH 2/4] Renamed "snipe" to "snipe-it" as it should be --- templates/{SnipeIT => Snipe-IT}/0/docker-compose.yml | 2 +- templates/{SnipeIT => Snipe-IT}/0/rancher-compose.yml | 0 templates/{SnipeIT => Snipe-IT}/catalogIcon-snipeit.svg | 0 templates/{SnipeIT => Snipe-IT}/config.yml | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename templates/{SnipeIT => Snipe-IT}/0/docker-compose.yml (99%) rename templates/{SnipeIT => Snipe-IT}/0/rancher-compose.yml (100%) rename templates/{SnipeIT => Snipe-IT}/catalogIcon-snipeit.svg (100%) rename templates/{SnipeIT => Snipe-IT}/config.yml (100%) diff --git a/templates/SnipeIT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml similarity index 99% rename from templates/SnipeIT/0/docker-compose.yml rename to templates/Snipe-IT/0/docker-compose.yml index ee4aa0a..800f87a 100644 --- a/templates/SnipeIT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: - snipe: + snipe-it: image: snipe/snipe-it:latest depends_on: - mysql diff --git a/templates/SnipeIT/0/rancher-compose.yml b/templates/Snipe-IT/0/rancher-compose.yml similarity index 100% rename from templates/SnipeIT/0/rancher-compose.yml rename to templates/Snipe-IT/0/rancher-compose.yml diff --git a/templates/SnipeIT/catalogIcon-snipeit.svg b/templates/Snipe-IT/catalogIcon-snipeit.svg similarity index 100% rename from templates/SnipeIT/catalogIcon-snipeit.svg rename to templates/Snipe-IT/catalogIcon-snipeit.svg diff --git a/templates/SnipeIT/config.yml b/templates/Snipe-IT/config.yml similarity index 100% rename from templates/SnipeIT/config.yml rename to templates/Snipe-IT/config.yml From 79c5abee2bce02a897f18b0bad2064335f0eae1b Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 17 Nov 2018 18:16:17 -0500 Subject: [PATCH 3/4] Turned APP_DEBUG off --- templates/Snipe-IT/0/docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 800f87a..f39a920 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -9,15 +9,14 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - # APP_ENV: production - APP_DEBUG: true + APP_ENV: production + APP_DEBUG: false APP_URL: ${URL}:${WEB_PORT} APP_KEY: ${APP_KEY} MYSQL_HOST: mysql MYSQL_DATABASE: snipeit MYSQL_USER: snipe_user MYSQL_PASSWORD: ${DB_USER_PASS} - APP_ENV: labels: io.rancher.container.pull_image: always {{- if .Values.HOST_LABEL}} From f54e0a2bd7b8d9234af82941286d0f92356bcd74 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 17 Nov 2018 18:25:11 -0500 Subject: [PATCH 4/4] Quick & Dirty README as a reminder for later --- templates/Snipe-IT/0/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 templates/Snipe-IT/0/README.md diff --git a/templates/Snipe-IT/0/README.md b/templates/Snipe-IT/0/README.md new file mode 100644 index 0000000..50931e0 --- /dev/null +++ b/templates/Snipe-IT/0/README.md @@ -0,0 +1,7 @@ +# Snipe-IT + + +### 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