Allowed more config flexibility

This commit is contained in:
WilliamMiceli
2018-07-08 19:02:46 -04:00
parent 816064506c
commit 5bd8a3ab90
2 changed files with 36 additions and 14 deletions

View File

@@ -5,14 +5,14 @@ services:
environment:
APP_ENV: production
APP_DEBUG: false
APP_URL: http://localhost:${HTTP_PORT}
APP_URL: ${URL}:${HOST_HTTP_PORT}
APP_CIPHER: AES-256-CBC
APP_KEY: ${APP_KEY}
DB_STRICT: false
DB_HOST: ninja-mysql
DB_DATABASE: ninja_db
DB_USERNAME: ninja
DB_PASSWORD: ninjaPass
DB_PASSWORD: ${DB_USER_PASS}
{{- if (.Values.GMAPS_KEY)}}
API_SECRET: ${MOBILE_APP_SECRET}
{{- end}}
@@ -21,7 +21,7 @@ services:
{{- end}}
labels:
{{- if (.Values.LABEL_KEY_VALUE)}}
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
io.rancher.sidekicks: cron, web
links:
@@ -45,14 +45,14 @@ services:
environment:
APP_ENV: production
APP_DEBUG: false
APP_URL: http://localhost:${HTTP_PORT}
APP_URL: ${URL}:${HOST_HTTP_PORT}
APP_CIPHER: AES-256-CBC
APP_KEY: ${APP_KEY}
DB_STRICT: false
DB_HOST: ninja-mysql
DB_DATABASE: ninja_db
DB_USERNAME: ninja
DB_PASSWORD: ninjaPass
DB_PASSWORD: ${DB_USER_PASS}
{{- if (.Values.GMAPS_KEY)}}
API_SECRET: ${MOBILE_APP_SECRET}
{{- end}}
@@ -61,7 +61,7 @@ services:
{{- end}}
labels:
{{- if (.Values.LABEL_KEY_VALUE)}}
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
links:
- db:ninja-mysql
@@ -72,12 +72,12 @@ services:
image: mysql:5
environment:
MYSQL_DATABASE: ninja_db
MYSQL_ROOT_PASSWORD: rootPass
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_USER: ninja
MYSQL_PASSWORD: ninjaPass
MYSQL_PASSWORD: ${DB_USER_PASS}
labels:
{{- if (.Values.LABEL_KEY_VALUE)}}
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
restart: on-failure
volumes:
@@ -86,12 +86,12 @@ services:
image: nginx
labels:
{{- if (.Values.LABEL_KEY_VALUE)}}
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
links:
- app
ports:
- "${HTTP_PORT}:80"
- "${HOST_HTTP_PORT}:80"
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${CONFIG_DIR}/nginx.conf:/etc/nginx/nginx.conf:ro

View File

@@ -8,7 +8,7 @@ catalog:
# upgrade_from:
questions:
- variable: "LABEL_KEY_VALUE"
- variable: "HOST_LABEL"
label: "Host Label Key/Value Pair"
description: |
The Label Key/Value pair on the host which InvoiceNinja should be deployed
@@ -16,8 +16,16 @@ catalog:
required: false
type: string
- variable: "HTTP_PORT"
label: "HTTP Port"
- variable: "URL"
label: "URL"
description: |
The domain or hostname the service can be accessed at.
default: "http://localhost"
required: true
type: string
- variable: "HOST_HTTP_PORT"
label: "Host HTTP Port"
description: |
The HTTP port to access the web interface on.
default: "8000"
@@ -64,6 +72,20 @@ catalog:
required: true
type: string
- variable: "DB_ROOT_PASS"
label: "MySQL Root Password"
description: |
A secure password to be used by the "root" MySQL user.
required: true
type: password
- variable: "DB_USER_PASS"
label: "MySQL User Password"
description: |
A secure password to be used by the "ninja" MySQL user.
required: true
type: password
- variable: "APP_KEY"
label: "Encryption Key"
description: |