Merge branch 'develop/snipe-it'

This commit is contained in:
WilliamMiceli
2018-12-07 21:55:32 -05:00
3 changed files with 29 additions and 18 deletions

View File

@@ -4,4 +4,8 @@
### Generate Your App Key Using: ### Generate Your App Key Using:
`php artisan key:generate` `php artisan key:generate`
https://snipe-it.readme.io/docs/generate-your-app-key https://snipe-it.readme.io/docs/generate-your-app-key
### After upgrading to a later version, use:
`php artisan migrate`

View File

@@ -9,17 +9,17 @@ services:
- 1.1.1.1 - 1.1.1.1
- 1.0.0.1 - 1.0.0.1
environment: environment:
APP_ENV: production APP_ENV: production # "development" or "production"
APP_DEBUG: false APP_DEBUG: false
{{- if .Values.TRAEFIK_HOST}} {{- if .Values.TRAEFIK_HOST}}
APP_URL: https://${TRAEFIK_HOST} APP_URL: https://${TRAEFIK_HOST} # No port number needed
{{- else}} {{- else}}
APP_URL: http://localhost APP_URL: http://localhost
{{- end}} {{- end}}
APP_KEY: ${APP_KEY} APP_KEY: ${APP_KEY}
MYSQL_HOST: mysql MYSQL_HOST: mysql
MYSQL_DATABASE: snipeit MYSQL_DATABASE: snipeit_db
MYSQL_USER: snipe_user MYSQL_USER: snipeit_user
MYSQL_PASSWORD: ${DB_USER_PASS} MYSQL_PASSWORD: ${DB_USER_PASS}
labels: labels:
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
@@ -28,14 +28,15 @@ services:
{{- end}} {{- end}}
{{- if .Values.TRAEFIK_HOST}} {{- if .Values.TRAEFIK_HOST}}
traefik.enable: true traefik.enable: true
traefik.frontend.rule: Host:${TRAEFIK_HOST} ### Start Web Segment
traefik.frontend.entryPoints: http,https traefik.web.frontend.entryPoints: http,https
traefik.frontend.headers.forceSTSHeader: true traefik.web.frontend.headers.forceSTSHeader: true
traefik.frontend.headers.SSLRedirect: true traefik.web.frontend.headers.SSLRedirect: true
traefik.frontend.headers.STSPreload: true traefik.web.frontend.headers.STSPreload: true
traefik.frontend.headers.SSLProxyHeaders: X-Forwarded-Proto:https traefik.web.frontend.headers.STSSeconds: 15552000
traefik.frontend.headers.STSSeconds: 15552000 traefik.web.frontend.rule: Host:${TRAEFIK_HOST}
traefik.port: "80" traefik.web.port: "80"
### End Web Segment
{{- else}} {{- else}}
traefik.enable: false traefik.enable: false
{{- end}} {{- end}}
@@ -43,7 +44,7 @@ services:
- mysql - mysql
networks: networks:
- public-proxy - public-proxy
{{- if .Values.WEB_PORT}} {{- if .Values.WEB_PORT}} # Allows for local access to be disabled
ports: ports:
- "${WEB_PORT}:80" - "${WEB_PORT}:80"
{{- else}} {{- else}}
@@ -62,15 +63,19 @@ services:
- 1.1.1.1 - 1.1.1.1
- 1.0.0.1 - 1.0.0.1
environment: environment:
MYSQL_DATABASE: snipeit MYSQL_DATABASE: snipeit_db
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_USER: snipe_user MYSQL_USER: snipeit_user
MYSQL_PASSWORD: ${DB_USER_PASS} MYSQL_PASSWORD: ${DB_USER_PASS}
labels: labels:
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
{{- 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}}
networks:
db-admin:
aliases:
- snipe-it # This should allow access from "mysql.snipe-it.rancher.internal"
restart: on-failure restart: on-failure
volumes: volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
@@ -78,5 +83,7 @@ services:
- /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql - /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql
networks: networks:
db-admin:
external: true
public-proxy: public-proxy:
external: true external: true

View File

@@ -53,7 +53,7 @@ catalog:
- variable: "DB_USER_PASS" - variable: "DB_USER_PASS"
label: "MySQL User Password" label: "MySQL User Password"
description: | 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: # default:
required: true required: true
type: password type: password
@@ -61,6 +61,6 @@ catalog:
- variable: "APP_KEY" - variable: "APP_KEY"
label: "Encryption Key" label: "Encryption Key"
description: | description: |
A random 32-Character string which will be used for encryption. See README.
required: true required: true
type: password type: password