Merge branch 'develop/snipe-it'

This commit is contained in:
WilliamMiceli
2018-12-07 19:51:47 -05:00
3 changed files with 45 additions and 10 deletions

View File

@@ -11,7 +11,11 @@ services:
environment: environment:
APP_ENV: production APP_ENV: production
APP_DEBUG: false APP_DEBUG: false
APP_URL: ${URL}:${WEB_PORT} {{- if .Values.TRAEFIK_HOST}}
APP_URL: https://${TRAEFIK_HOST}
{{- else}}
APP_URL: http://localhost
{{- end}}
APP_KEY: ${APP_KEY} APP_KEY: ${APP_KEY}
MYSQL_HOST: mysql MYSQL_HOST: mysql
MYSQL_DATABASE: snipeit MYSQL_DATABASE: snipeit
@@ -22,13 +26,36 @@ services:
{{- if .Values.HOST_LABEL}} {{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}} {{- 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.SSLProxyHeaders: X-Forwarded-Proto:https
traefik.frontend.headers.STSSeconds: 15552000
traefik.port: "80"
{{- else}}
traefik.enable: false
{{- end}}
links: links:
- mysql - mysql
networks:
- public-proxy
{{- if .Values.WEB_PORT}}
ports: ports:
- "${WEB_PORT}:80" - "${WEB_PORT}:80"
{{- else}}
expose:
- "80"
{{- end}}
restart: on-failure restart: on-failure
volumes: 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
- /RancherCattleData/${DATA_DIR}/Application:/var/lib/snipeit - /RancherCattleData/${DATA_DIR}/Application:/var/lib/snipeit
- /RancherCattleData/${DATA_DIR}/Backups:/var/www/html/storage/app/backups
mysql: mysql:
image: mysql:5 image: mysql:5
dns: dns:
@@ -46,4 +73,10 @@ services:
{{- end}} {{- end}}
restart: on-failure restart: on-failure
volumes: volumes:
- /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql - /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
- /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql
networks:
public-proxy:
external: true

View File

@@ -1,6 +1,6 @@
version: '2' version: '2'
catalog: catalog:
name: SnipeIT name: Snipe-IT
version: latest version: latest
# description: # description:
# minimum_rancher_version: # minimum_rancher_version:
@@ -16,20 +16,22 @@ catalog:
required: false required: false
type: string type: string
- variable: "URL" - variable: "TRAEFIK_HOST"
label: "URL" label: "Public Host Domain"
description: | description: |
The domain or hostname the service can be accessed at. The host that Traefik will use to provide public access.
default: "http://localhost" Leaving this empty will disable Traefik on this stack.
required: true default: "subdomain.domain.tld"
required: false
type: string type: string
- variable: "WEB_PORT" - variable: "WEB_PORT"
label: "Local Web Port" label: "Local Web Port"
description: | description: |
The port to locally access the web interface on. The port to locally access the web interface on.
Leaving this empty will not expose a any port on the host system, disabling local access outside of it's Rancher network.
default: "10300" default: "10300"
required: true required: false
type: string type: string
- variable: "DATA_DIR" - variable: "DATA_DIR"

View File

@@ -1,6 +1,6 @@
name: Snipe-IT name: Snipe-IT
description: | description: |
Status: NOT READY Free, open source IT asset and license management system.
version: latest version: latest
category: Asset Management category: Asset Management
maintainer: WilliamMiceli maintainer: WilliamMiceli