From 5f74ec5a8310f5bedca4d79bc0e221e0781019bf Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Sun, 24 Jun 2018 19:06:09 -0400 Subject: [PATCH] Switching to .env File Instead --- templates/invoice-ninja/0/docker-compose.yml | 27 +++---------------- templates/invoice-ninja/0/rancher-compose.yml | 14 ---------- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/templates/invoice-ninja/0/docker-compose.yml b/templates/invoice-ninja/0/docker-compose.yml index 06a4bfa..017e815 100644 --- a/templates/invoice-ninja/0/docker-compose.yml +++ b/templates/invoice-ninja/0/docker-compose.yml @@ -2,16 +2,7 @@ version: '2' services: app: image: invoiceninja/invoiceninja - environment: - - APP_DEBUG=0 - - APP_ENV='production' - - APP_KEY=${APP_KEY} - - APP_CIPHER='AES-256-CBC' - - APP_URL='http://localhost:${WEB_PORT}' - - DB_HOST='mysql' - - DB_DATABASE='ninja' - - DB_USERNAME='root' - - DB_PASSWORD='ninjaPass' + env_file: .env labels: io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} io.rancher.sidekicks: cron, web @@ -21,6 +12,7 @@ services: volumes: - ${STORAGE_BASE_DIR}${LOGO_DIR}:/var/www/app/public/logo - ${STORAGE_BASE_DIR}${STORAGE_DIR}:/var/www/app/storage + - ${STORAGE_BASE_DIR}${CONFIG_DIR}/.env:/var/www/app/.env cron: image: invoiceninja/invoiceninja entrypoint: | @@ -33,16 +25,7 @@ services: sleep 1h done EOF' - environment: - - APP_DEBUG=0 - - APP_ENV='production' - - APP_KEY=${APP_KEY} - - APP_CIPHER='AES-256-CBC' - - APP_URL='http://localhost:${WEB_PORT}' - - DB_HOST='mysql' - - DB_DATABASE='ninja' - - DB_USERNAME='root' - - DB_PASSWORD='ninjaPass' + env_file: .env labels: io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} links: @@ -52,9 +35,7 @@ services: - app db: image: mysql - environment: - - MYSQL_ROOT_PASSWORD='ninjaPass' - - MYSQL_DATABASE='ninja' + env_file: .env labels: io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} restart: on-failure diff --git a/templates/invoice-ninja/0/rancher-compose.yml b/templates/invoice-ninja/0/rancher-compose.yml index 30f0ca6..62ce452 100644 --- a/templates/invoice-ninja/0/rancher-compose.yml +++ b/templates/invoice-ninja/0/rancher-compose.yml @@ -11,13 +11,6 @@ catalog: default: "host.id=0000" required: true type: string - - variable: "WEB_PORT" - label: "Port Number" - description: | - The port to access the web interface on. - default: "8000" - required: true - type: string - variable: "STORAGE_BASE_DIR" label: "Base Storage Directory" description: | @@ -53,12 +46,5 @@ catalog: default: "/Config" required: true type: string - - variable: "APP_KEY" - label: "Random string" - description: | - A random string - default: "SomeRandomStringSomeRandomString" - required: true - type: string app: scale: 1 \ No newline at end of file