Converted to using NFS volumes

This commit is contained in:
WilliamMiceli
2018-08-02 19:52:08 -04:00
parent f1017a806f
commit 04cb3225f0
2 changed files with 41 additions and 47 deletions

View File

@@ -31,8 +31,8 @@ services:
- db:ninja-mysql
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${LOGO_DIR}:/var/www/app/public/logo
- ${STORAGE_BASE_DIR}${STORAGE_DIR}:/var/www/app/storage
- Logo:/var/www/app/public/logo
- Storage:/var/www/app/storage
cron:
image: invoiceninja/invoiceninja
dns:
@@ -90,7 +90,7 @@ services:
{{- end}}
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${DB_DIR}:/var/lib/mysql
- Database:/var/lib/mysql
web:
image: nginx
dns:
@@ -106,6 +106,32 @@ services:
- "${HOST_HTTP_PORT}:80"
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${CONFIG_DIR}/nginx.conf:/etc/nginx/nginx.conf:ro
- Web:/etc/nginx:ro
volumes_from:
- app
- app
volumes:
Database:
driver: rancher-nfs
driver_opts:
host: 10.0.10.21
export: /RancherCattleData/${DATA_DIR}/Database
onRemove: retain
Logo:
driver: rancher-nfs
driver_opts:
host: 10.0.10.21
export: /RancherCattleData/${DATA_DIR}/Logo
onRemove: retain
Storage:
driver: rancher-nfs
driver_opts:
host: 10.0.10.21
export: /RancherCattleData/${DATA_DIR}/Storage
onRemove: retain
Web:
driver: rancher-nfs
driver_opts:
host: 10.0.10.21
export: /RancherCattleData/${DATA_DIR}/Web
onRemove: retain

View File

@@ -32,46 +32,6 @@ catalog:
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/InvoiceNinja"
required: true
type: string
- variable: "LOGO_DIR"
label: "Logo Directory"
description: |
The folder for persistent logo files.
default: "/Logo"
required: true
type: string
- variable: "STORAGE_DIR"
label: "Storage Directory"
description: |
The folder for persistent storage files.
default: "/Storage"
required: true
type: string
- variable: "DB_DIR"
label: "Database Directory"
description: |
The folder which will store the persistent database files.
default: "/Database"
required: true
type: string
- variable: "CONFIG_DIR"
label: "Configuration Directory"
description: |
The folder which configuration files should be in.
default: "/Config"
required: true
type: string
- variable: "DB_ROOT_PASS"
label: "MySQL Root Password"
description: |
@@ -107,6 +67,14 @@ catalog:
required: false
type: password
- variable: DATA_DIR
label: "Data Directory"
description: |
The directory within the stack directory to store data
default: "InvoiceNinja/Personal"
required: true
type: string
# - variable: "SSL_CERT"
# label: "SSL Certificate"
# description: |
@@ -114,5 +82,5 @@ catalog:
# required: false
# type: certificate
services:
app:
#services:
# app: