Group refinements
This commit is contained in:
parent
c8ccee7ada
commit
f20cd5a53c
15 changed files with 287 additions and 23 deletions
|
|
@ -20,6 +20,7 @@ x-bridge-vars: &common-bridge-variables
|
|||
NEXTAUTH_URL: ${BRIDGE_DOMAIN}
|
||||
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
|
||||
BRIDGE_SIGNAL_URL: ${BRIDGE_SIGNAL_URL}
|
||||
BRIDGE_SIGNAL_AUTO_GROUPS: ${BRIDGE_SIGNAL_AUTO_GROUPS}
|
||||
|
||||
services:
|
||||
bridge-frontend:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const { spawn } = require("child_process");
|
||||
const path = require('path');
|
||||
|
||||
const app = process.argv[2];
|
||||
const command = process.argv[3];
|
||||
|
|
@ -16,10 +17,19 @@ const files = {
|
|||
zammad: ["zammad", "postgresql", "opensearch"],
|
||||
};
|
||||
|
||||
|
||||
const envFile = path.resolve(process.cwd(), '.env');
|
||||
const finalFiles = files[app]
|
||||
.map((file) => ['-f', `docker/compose/${file}.yml`]).flat();
|
||||
|
||||
// Add bridge-dev.yml for dev commands that include zammad
|
||||
const devAppsWithZammad = ['linkDev', 'bridgeDev', 'all'];
|
||||
if (devAppsWithZammad.includes(app) && files[app].includes('zammad')) {
|
||||
finalFiles.push('-f', 'docker-compose.bridge-dev.yml');
|
||||
}
|
||||
|
||||
const finalCommand = command === "up" ? ["up", "-d", "--remove-orphans"] : [command];
|
||||
const dockerCompose = spawn('docker', ['compose', '--env-file', '.env', ...finalFiles, ...finalCommand]);
|
||||
const dockerCompose = spawn('docker', ['compose', '--env-file', envFile, ...finalFiles, ...finalCommand]);
|
||||
|
||||
dockerCompose.stdout.on('data', (data) => {
|
||||
console.info(`${data}`);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'base64'
|
||||
|
||||
ROOT = '/opt/zammad'
|
||||
|
||||
def _read_file(file, fullpath: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue