Compare commits
72 commits
Author | SHA1 | Date | |
---|---|---|---|
da85bc114e | |||
277b096317 | |||
2ffef749a3 | |||
9b701648c5 | |||
194b260b8a | |||
2cfe988f2d | |||
0cc5eab960 | |||
fcf602cc1b | |||
60e22b24bd | |||
d2a80652fb | |||
76e0454f79 | |||
5aac9dc628 | |||
652c26cb7d | |||
d4fb8ca9e2 | |||
8f714c3bdd | |||
0e47be31c6 | |||
0f5821f692 | |||
4ac3f4ca49 | |||
89cb9f8223 | |||
|
618fbb07fc | ||
665b295068 | |||
5dc575edaf | |||
aec1e41b98 | |||
e7c85e2bb0 | |||
3558149e67 | |||
93413a6dea | |||
fb2c9bcaf8 | |||
0a58abbf9e | |||
|
7c00b3408e | ||
|
f4fe85907d | ||
|
1735f434c3 | ||
cd4e9e9ce7 | |||
d575f22cb3 | |||
2c8e3d3ed5 | |||
e3df3ef450 | |||
2e2c9bc615 | |||
c701818420 | |||
7a338774aa | |||
32284d90bd | |||
c5b802543e | |||
d8f13cc9cc | |||
c4ec458c6b | |||
a9760ccf04 | |||
30c0ad8ee4 | |||
ddc4bd3b22 | |||
d4efc9f593 | |||
768df30e5d | |||
f96d8edc30 | |||
8af9b747fd | |||
7a079de3a6 | |||
25a63ce0a9 | |||
a1896602af | |||
83f0b63685 | |||
6a5586d2a8 | |||
7023c9d958 | |||
7a4cd805ca | |||
f42b9d5470 | |||
ef0d217cee | |||
86756597de | |||
de98e87655 | |||
4272e5f598 | |||
|
89de4ed0a5 | ||
|
ee4ae4035d | ||
d3f5d10b3f | |||
61d05ceedb | |||
fd2c24851b | |||
79b77da808 | |||
388c4363af | |||
50a14f0d15 | |||
eec7bfa37c | |||
4f6f431bc4 | |||
5d6524b9e3 |
33 changed files with 2731 additions and 5359 deletions
|
@ -6,7 +6,7 @@ stages:
|
||||||
- image
|
- image
|
||||||
|
|
||||||
.img: &img
|
.img: &img
|
||||||
image: "domaindrivenarchitecture/ddadevops-dind:4.7.2"
|
image: "domaindrivenarchitecture/ddadevops-dind:4.11.3"
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -16,7 +16,7 @@ stages:
|
||||||
- export IMAGE_TAG=$CI_COMMIT_TAG
|
- export IMAGE_TAG=$CI_COMMIT_TAG
|
||||||
|
|
||||||
.cljs-job: &cljs
|
.cljs-job: &cljs
|
||||||
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.2"
|
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.11.3"
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
|
@ -29,7 +29,7 @@ stages:
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
.clj-job: &clj
|
.clj-job: &clj
|
||||||
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.2"
|
image: "domaindrivenarchitecture/ddadevops-clj:4.11.3"
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
|
@ -93,6 +93,15 @@ package-uberjar:
|
||||||
paths:
|
paths:
|
||||||
- target/uberjar
|
- target/uberjar
|
||||||
|
|
||||||
|
package-native:
|
||||||
|
<<: *clj
|
||||||
|
stage: package
|
||||||
|
script:
|
||||||
|
- pyb package_native
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- target/graalvm
|
||||||
|
|
||||||
release-to-clojars:
|
release-to-clojars:
|
||||||
<<: *clj
|
<<: *clj
|
||||||
<<: *tag_only
|
<<: *tag_only
|
||||||
|
@ -113,11 +122,3 @@ jitsi-web-image-publish:
|
||||||
stage: image
|
stage: image
|
||||||
script:
|
script:
|
||||||
- cd infrastructure/web && pyb image publish
|
- cd infrastructure/web && pyb image publish
|
||||||
|
|
||||||
jitsi-excalidraw-backend-image-publish:
|
|
||||||
<<: *img
|
|
||||||
<<: *tag_only
|
|
||||||
stage: image
|
|
||||||
script:
|
|
||||||
- cd infrastructure/excalidraw-backend && pyb image publish
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# convention 4 kubernetes: c4k-jitsi
|
# convention 4 kubernetes: c4k-jitsi
|
||||||
[![Clojars Project](https://img.shields.io/clojars/v/org.domaindrivenarchitecture/c4k-jitsi.svg)](https://clojars.org/org.domaindrivenarchitecture/c4k-jitsi) [![pipeline status](https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/badges/master/pipeline.svg)](https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/commits/main)
|
[![Clojars Project](https://img.shields.io/clojars/v/org.domaindrivenarchitecture/c4k-jitsi.svg)](https://clojars.org/org.domaindrivenarchitecture/c4k-jitsi) [![pipeline status](https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/badges/master/pipeline.svg)](https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/commits/main)
|
||||||
|
|
||||||
[<img src="https://domaindrivenarchitecture.org/img/delta-chat.svg" width=20 alt="DeltaChat"> chat over e-mail](mailto:buero@meissa-gmbh.de?subject=community-chat) | [<img src="https://meissa-gmbh.de/img/community/Mastodon_Logotype.svg" width=20 alt="team@social.meissa-gmbh.de"> team@social.meissa-gmbh.de](https://social.meissa-gmbh.de/@team) | [Website & Blog](https://domaindrivenarchitecture.org)
|
[<img src="https://domaindrivenarchitecture.org/img/delta-chat.svg" width=20 alt="DeltaChat"> chat over e-mail](mailto:buero@meissa-gmbh.de?subject=community-chat) | [<img src="https://meissa.de/images/parts/contact/mastodon36_hue9b2464f10b18e134322af482b9c915e_5501_filter_14705073121015236177.png" width=20 alt="M"> meissa@social.meissa-gmbh.de](https://social.meissa-gmbh.de/@meissa) | [Blog](https://domaindrivenarchitecture.org) | [Website](https://meissa.de)
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
|
@ -39,13 +39,14 @@ Development happens at: https://repo.prod.meissa.de/meissa/c4k-jitsi
|
||||||
|
|
||||||
Mirrors are:
|
Mirrors are:
|
||||||
|
|
||||||
* https://gitlab.com/domaindrivenarchitecture/c4k-jitsi (issues and PR, CI)
|
* https://codeberg.org/meissa/c4k-jitsi (Issues and PR)
|
||||||
|
* https://gitlab.com/domaindrivenarchitecture/c4k-jitsi (CI)
|
||||||
* https://github.com/DomainDrivenArchitecture/c4k-jitsi
|
* https://github.com/DomainDrivenArchitecture/c4k-jitsi
|
||||||
|
|
||||||
For more details about our repository model see: https://repo.prod.meissa.de/meissa/federate-your-repos
|
For more details about our repository model see: https://repo.prod.meissa.de/meissa/federate-your-repos
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © 2022 meissa GmbH
|
Copyright © 2021, 2022, 2023, 2024 meissa GmbH
|
||||||
Licensed under the [Apache License, Version 2.0](LICENSE) (the "License")
|
Licensed under the [Apache License, Version 2.0](LICENSE) (the "License")
|
||||||
Pls. find licenses of our subcomponents [here](doc/SUBCOMPONENT_LICENSE)
|
Pls. find licenses of our subcomponents [here](doc/SUBCOMPONENT_LICENSE)
|
||||||
|
|
56
build.py
56
build.py
|
@ -18,6 +18,7 @@ def initialize(project):
|
||||||
"stage": "notused",
|
"stage": "notused",
|
||||||
"project_root_path": PROJECT_ROOT_PATH,
|
"project_root_path": PROJECT_ROOT_PATH,
|
||||||
"build_types": [],
|
"build_types": [],
|
||||||
|
"release_artifacts": ["target/uberjar/c4k-jitsi-standalone.jar"],
|
||||||
"mixin_types": ["RELEASE"],
|
"mixin_types": ["RELEASE"],
|
||||||
"release_primary_build_file": "project.clj",
|
"release_primary_build_file": "project.clj",
|
||||||
"release_secondary_build_files": [
|
"release_secondary_build_files": [
|
||||||
|
@ -29,8 +30,9 @@ def initialize(project):
|
||||||
"release_organisation": "meissa",
|
"release_organisation": "meissa",
|
||||||
"release_repository_name": name,
|
"release_repository_name": name,
|
||||||
"release_artifacts": [
|
"release_artifacts": [
|
||||||
"target/uberjar/c4k-jitsi-standalone.jar",
|
f"target/graalvm/{name}",
|
||||||
"target/frontend-build/c4k-jitsi.js",
|
f"target/uberjar/{name}-standalone.jar",
|
||||||
|
f"target/frontend-build/{name}.js",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +97,7 @@ def package_frontend(project):
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def package_uberjar(project):
|
def package_uberjar(project):
|
||||||
|
run("lein uberjar", shell=True, check=True)
|
||||||
run(
|
run(
|
||||||
"sha256sum target/uberjar/c4k-jitsi-standalone.jar > target/uberjar/c4k-jitsi-standalone.jar.sha256",
|
"sha256sum target/uberjar/c4k-jitsi-standalone.jar > target/uberjar/c4k-jitsi-standalone.jar.sha256",
|
||||||
shell=True,
|
shell=True,
|
||||||
|
@ -107,6 +110,39 @@ def package_uberjar(project):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def package_native(project):
|
||||||
|
run(
|
||||||
|
"mkdir -p target/graalvm",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
run(
|
||||||
|
"native-image " +
|
||||||
|
"--native-image-info " +
|
||||||
|
"--report-unsupported-elements-at-runtime " +
|
||||||
|
"--no-server " +
|
||||||
|
"--no-fallback " +
|
||||||
|
"--features=clj_easy.graal_build_time.InitClojureClasses " +
|
||||||
|
f"-jar target/uberjar/{project.name}-standalone.jar " +
|
||||||
|
"-H:IncludeResources=.*.yaml " +
|
||||||
|
"-H:Log=registerResource:verbose " +
|
||||||
|
f"-H:Name=target/graalvm/{project.name}",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
run(
|
||||||
|
f"sha256sum target/graalvm/{project.name} > target/graalvm/{project.name}.sha256",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
run(
|
||||||
|
f"sha512sum target/graalvm/{project.name} > target/graalvm/{project.name}.sha512",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def upload_clj(project):
|
def upload_clj(project):
|
||||||
run("lein deploy", shell=True, check=True)
|
run("lein deploy", shell=True, check=True)
|
||||||
|
@ -126,6 +162,22 @@ def lint(project):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def inst(project):
|
||||||
|
package_uberjar(project)
|
||||||
|
package_native(project)
|
||||||
|
run(
|
||||||
|
f"sudo install -m=755 target/uberjar/{project.name}-standalone.jar /usr/local/bin/{project.name}-standalone.jar",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
run(
|
||||||
|
f"sudo install -m=755 target/graalvm/{project.name} /usr/local/bin/{project.name}",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def patch(project):
|
def patch(project):
|
||||||
linttest(project, "PATCH")
|
linttest(project, "PATCH")
|
||||||
|
|
|
@ -6,7 +6,7 @@ from ddadevops import *
|
||||||
name = "c4k-jitsi"
|
name = "c4k-jitsi"
|
||||||
MODULE = "excalidraw-backend"
|
MODULE = "excalidraw-backend"
|
||||||
PROJECT_ROOT_PATH = "../.."
|
PROJECT_ROOT_PATH = "../.."
|
||||||
version = "1.5.1"
|
version = "2.2.1-dev"
|
||||||
|
|
||||||
|
|
||||||
@init
|
@init
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
# Taken from: https://github.com/jitsi/excalidraw-backend
|
# Taken from: https://github.com/jitsi/excalidraw-backend
|
||||||
FROM node:16.17-slim
|
FROM node:22-bookworm-slim
|
||||||
|
|
||||||
WORKDIR /excalidraw-backend
|
WORKDIR /excalidraw-backend
|
||||||
|
|
||||||
|
COPY resources/package.json resources/package-lock.json resources/tsconfig.json resources/install.sh resources/src resources/install_functions_debian.sh ./
|
||||||
|
|
||||||
COPY resources/package.json resources/package-lock.json resources/tsconfig.json resources/src ./
|
RUN ./install.sh
|
||||||
RUN npm install
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
!package-lock.json
|
|
17
infrastructure/excalidraw-backend/image/resources/install.sh
Executable file
17
infrastructure/excalidraw-backend/image/resources/install.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -exo pipefail
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
{
|
||||||
|
upgradeSystem
|
||||||
|
} > /dev/null
|
||||||
|
|
||||||
|
cleanupDocker
|
||||||
|
}
|
||||||
|
|
||||||
|
source ./install_functions_debian.sh
|
||||||
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
||||||
|
|
||||||
|
npm audit fix
|
||||||
|
npm ci --omit=dev
|
||||||
|
npm run build
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "excalidraw-backend",
|
"name": "excalidraw-backend",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"description": "Excalidraw backend",
|
"description": "Excalidraw backend",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -9,22 +9,22 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": ">=18.0.0",
|
||||||
"npm": ">=7.0.0"
|
"npm": ">=10.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/debug": "4.1.5",
|
"@types/debug": "4.1.10",
|
||||||
"@types/express": "4.17.11",
|
"@types/express": "4.17.20",
|
||||||
"@types/node": "14.14.31",
|
"@types/ms": "0.7.33",
|
||||||
"@types/socket.io": "2.1.4",
|
"@types/node": "20.8.7",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"debug": "4.3.1",
|
"debug": "4.3.4",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"express": "4.17.1",
|
"express": "^4.19.2",
|
||||||
"socket.io": "^2.5.0",
|
"socket.io": "^4.7.2",
|
||||||
"socket.io-prometheus-metrics": "^1.0.6",
|
"prom-client": "^15.0.0",
|
||||||
"ts-node-dev": "^1.1.8",
|
"ts-node-dev": "^2.0.0",
|
||||||
"typescript": "4.2.3"
|
"typescript": "5.2.2"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -37,16 +37,15 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jitsi/eslint-config": "^4.1.0",
|
"@jitsi/eslint-config": "^4.1.0",
|
||||||
"@types/dotenv": "^8.2.0",
|
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.30.5",
|
"@typescript-eslint/parser": "6.8.0",
|
||||||
"@typescript-eslint/parser": "5.30.4",
|
"eslint": "^8.1.0",
|
||||||
"eslint": "8.1.0",
|
"eslint-plugin-import": "2.28.1",
|
||||||
"eslint-plugin-import": "2.25.2",
|
"eslint-plugin-jsdoc": "46.8.2",
|
||||||
"eslint-plugin-jsdoc": "37.0.3",
|
"eslint-plugin-typescript-sort-keys": "^3.1.0"
|
||||||
"eslint-plugin-typescript-sort-keys": "^2.1.0"
|
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"bufferutil": "^4.0.6",
|
"bufferutil": "^4.0.6",
|
||||||
"utf-8-validate": "^5.0.9"
|
"utf-8-validate": "^6.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,22 @@
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import dotenv from 'dotenv';
|
import dotenv from 'dotenv';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import http from 'http';
|
import { createServer } from 'node:http';
|
||||||
import socketIO from 'socket.io';
|
import { Server } from 'socket.io';
|
||||||
|
/*
|
||||||
import * as prometheus from 'socket.io-prometheus-metrics';
|
import * as prometheus from 'socket.io-prometheus-metrics';
|
||||||
|
|
||||||
const serverDebug = debug('server');
|
do not use anymore, since 3 years no further progression, depends on debug 4.1.1,
|
||||||
|
wich is moderate vulnerable to regular expression denial of service when untrusted user
|
||||||
|
input is passed into the o formatter.
|
||||||
|
|
||||||
|
alternatively could be used prom-client
|
||||||
|
*/
|
||||||
|
|
||||||
|
const serverDebug = debug('httpServer');
|
||||||
|
const app = express();
|
||||||
|
const port = process.env.PORT || 80; // default port to listen
|
||||||
|
const httpServer = createServer(app);
|
||||||
|
|
||||||
dotenv.config(
|
dotenv.config(
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
|
@ -15,53 +26,59 @@ dotenv.config(
|
||||||
: { path: '.env.production' }
|
: { path: '.env.production' }
|
||||||
);
|
);
|
||||||
|
|
||||||
const app = express();
|
|
||||||
const port = process.env.PORT || 80; // default port to listen
|
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
res.send('Excalidraw backend is up :)');
|
res.send('Excalidraw backend is up :)');
|
||||||
});
|
});
|
||||||
|
|
||||||
const server = http.createServer(app);
|
httpServer.listen(port, () => {
|
||||||
|
|
||||||
server.listen(port, () => {
|
|
||||||
serverDebug(`listening on port: ${port}`);
|
serverDebug(`listening on port: ${port}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
const io = socketIO(server, {
|
const corsOptions = {
|
||||||
handlePreflightRequest: (req, res) => {
|
origin: ['jitsi.test.meissa.de', 'jitsi.prod.meissa.de'],
|
||||||
const headers = {
|
methods: ["GET", "POST"],
|
||||||
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
credentials: true
|
||||||
'Access-Control-Allow-Origin': req.header?.origin ?? 'https://meet.jit.si',
|
};
|
||||||
'Access-Control-Allow-Credentials': true
|
|
||||||
};
|
|
||||||
|
|
||||||
res.writeHead(200, headers);
|
const io = new Server(httpServer, {
|
||||||
res.end();
|
allowEIO3: true,
|
||||||
},
|
cors: corsOptions,
|
||||||
maxHttpBufferSize: 10e6,
|
maxHttpBufferSize: 1e6,
|
||||||
pingTimeout: 10000
|
pingTimeout: 10000
|
||||||
});
|
});
|
||||||
|
|
||||||
// listens on host:9090/metrics
|
// listens on host:9090/metrics
|
||||||
|
/* do not use
|
||||||
prometheus.metrics(io, {
|
prometheus.metrics(io, {
|
||||||
collectDefaultMetrics: true
|
collectDefaultMetrics: true
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
io.on('connection', socket => {
|
/* alternatively could be used:
|
||||||
|
|
||||||
|
const client = require('prom-client');
|
||||||
|
const collectDefaultMetrics = client.collectDefaultMetrics;
|
||||||
|
const Registry = client.Registry;
|
||||||
|
const register = new Registry();
|
||||||
|
collectDefaultMetrics({ register });
|
||||||
|
|
||||||
|
or more:
|
||||||
|
https://codersociety.com/blog/articles/nodejs-application-monitoring-with-prometheus-and-grafana
|
||||||
|
*/
|
||||||
|
|
||||||
|
io.on('connection', (socket) => {
|
||||||
serverDebug(`connection established! ${socket.conn.request.url}`);
|
serverDebug(`connection established! ${socket.conn.request.url}`);
|
||||||
io.to(`${socket.id}`).emit('init-room');
|
io.to(`${socket.id}`).emit('init-room');
|
||||||
socket.on('join-room', roomID => {
|
socket.on('join-room', roomID => {
|
||||||
serverDebug(`${socket.id} has joined ${roomID} for url ${socket.conn.request.url}`);
|
serverDebug(`${socket.id} has joined ${roomID} for url ${socket.conn.request.url}`);
|
||||||
socket.join(roomID);
|
socket.join(roomID);
|
||||||
if (io.sockets.adapter.rooms[roomID].length <= 1) {
|
if (io.sockets.adapter.rooms.get(roomID)?.size ?? 0 <= 1) {
|
||||||
io.to(`${socket.id}`).emit('first-in-room');
|
io.to(`${socket.id}`).emit('first-in-room');
|
||||||
} else {
|
} else {
|
||||||
socket.broadcast.to(roomID).emit('new-user', socket.id);
|
socket.broadcast.to(roomID).emit('new-user', socket.id);
|
||||||
}
|
}
|
||||||
io.in(roomID).emit(
|
io.in(roomID).emit(
|
||||||
'room-user-change',
|
'room-user-change', Array.from(io.sockets.adapter.rooms.get(roomID) ?? [])
|
||||||
Object.keys(io.sockets.adapter.rooms[roomID].sockets)
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,8 +86,7 @@ io.on('connection', socket => {
|
||||||
'server-broadcast',
|
'server-broadcast',
|
||||||
(roomID: string, encryptedData: ArrayBuffer, iv: Uint8Array) => {
|
(roomID: string, encryptedData: ArrayBuffer, iv: Uint8Array) => {
|
||||||
socket.broadcast.to(roomID).emit('client-broadcast', encryptedData, iv);
|
socket.broadcast.to(roomID).emit('client-broadcast', encryptedData, iv);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
socket.on(
|
socket.on(
|
||||||
'server-volatile-broadcast',
|
'server-volatile-broadcast',
|
||||||
|
@ -78,14 +94,13 @@ io.on('connection', socket => {
|
||||||
socket.volatile.broadcast
|
socket.volatile.broadcast
|
||||||
.to(roomID)
|
.to(roomID)
|
||||||
.emit('client-broadcast', encryptedData, iv);
|
.emit('client-broadcast', encryptedData, iv);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
socket.on('disconnecting', () => {
|
socket.on('disconnecting', () => {
|
||||||
const rooms = io.sockets.adapter.rooms;
|
const rooms = io.sockets.adapter.rooms;
|
||||||
|
|
||||||
for (const roomID of Object.keys(socket.rooms)) {
|
for (const roomID of Object.keys(socket.rooms)) {
|
||||||
const clients = Object.keys(rooms[roomID].sockets).filter(id => id !== socket.id);
|
const clients = Array.from(rooms.get(roomID) ?? []).filter(id => id !== socket.id);
|
||||||
|
|
||||||
if (roomID !== socket.id) {
|
if (roomID !== socket.id) {
|
||||||
socket.to(roomID).emit('user has left', socket.id);
|
socket.to(roomID).emit('user has left', socket.id);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"outDir": "dist"
|
"outDir": "dist",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ from ddadevops import *
|
||||||
name = "c4k-jitsi"
|
name = "c4k-jitsi"
|
||||||
MODULE = "web"
|
MODULE = "web"
|
||||||
PROJECT_ROOT_PATH = "../.."
|
PROJECT_ROOT_PATH = "../.."
|
||||||
version = "1.5.1"
|
version = "2.2.1-dev"
|
||||||
|
|
||||||
|
|
||||||
@init
|
@init
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
FROM jitsi/web:stable-8922-1
|
# IMPORTANT: In case of base image update, "./resources/settings-config.js" also has to be updated manually!
|
||||||
|
FROM jitsi/web:stable-9646
|
||||||
|
|
||||||
# Prepare Configuration
|
# Prepare Configuration
|
||||||
ADD resources /tmp
|
ADD resources /tmp
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -Eeo pipefail
|
|
||||||
|
|
||||||
apt update > /dev/null
|
set -exo pipefail
|
||||||
|
|
||||||
install -m 0700 /tmp/install-debug.sh /usr/local/bin/
|
function main() {
|
||||||
install -m 0644 /tmp/settings-config.js /defaults/settings-config.js
|
{
|
||||||
|
upgradeSystem
|
||||||
|
} > /dev/null
|
||||||
|
|
||||||
|
install -m 0700 /tmp/install-debug.sh /usr/local/bin/
|
||||||
|
install -m 0644 /tmp/settings-config.js /defaults/settings-config.js
|
||||||
|
|
||||||
|
cleanupDocker
|
||||||
|
}
|
||||||
|
|
||||||
|
source /tmp/install_functions_debian.sh
|
||||||
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
|
@ -5,8 +5,6 @@
|
||||||
{{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
|
{{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
|
||||||
{{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}}
|
{{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}}
|
||||||
{{ $ENABLE_FILE_RECORDING_SHARING := .Env.ENABLE_FILE_RECORDING_SHARING | default "false" | toBool -}}
|
{{ $ENABLE_FILE_RECORDING_SHARING := .Env.ENABLE_FILE_RECORDING_SHARING | default "false" | toBool -}}
|
||||||
{{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}}
|
|
||||||
{{ $ENABLE_LIPSYNC := .Env.ENABLE_LIPSYNC | default "false" | toBool -}}
|
|
||||||
{{ $ENABLE_NO_AUDIO_DETECTION := .Env.ENABLE_NO_AUDIO_DETECTION | default "true" | toBool -}}
|
{{ $ENABLE_NO_AUDIO_DETECTION := .Env.ENABLE_NO_AUDIO_DETECTION | default "true" | toBool -}}
|
||||||
{{ $ENABLE_P2P := .Env.ENABLE_P2P | default "true" | toBool -}}
|
{{ $ENABLE_P2P := .Env.ENABLE_P2P | default "true" | toBool -}}
|
||||||
{{ $ENABLE_PREJOIN_PAGE := .Env.ENABLE_PREJOIN_PAGE | default "true" | toBool -}}
|
{{ $ENABLE_PREJOIN_PAGE := .Env.ENABLE_PREJOIN_PAGE | default "true" | toBool -}}
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
{{ $ENABLE_REMB := .Env.ENABLE_REMB | default "true" | toBool -}}
|
{{ $ENABLE_REMB := .Env.ENABLE_REMB | default "true" | toBool -}}
|
||||||
{{ $ENABLE_REQUIRE_DISPLAY_NAME := .Env.ENABLE_REQUIRE_DISPLAY_NAME | default "false" | toBool -}}
|
{{ $ENABLE_REQUIRE_DISPLAY_NAME := .Env.ENABLE_REQUIRE_DISPLAY_NAME | default "false" | toBool -}}
|
||||||
{{ $ENABLE_SIMULCAST := .Env.ENABLE_SIMULCAST | default "true" | toBool -}}
|
{{ $ENABLE_SIMULCAST := .Env.ENABLE_SIMULCAST | default "true" | toBool -}}
|
||||||
{{ $ENABLE_STATS_ID := .Env.ENABLE_STATS_ID | default "false" | toBool -}}
|
|
||||||
{{ $ENABLE_STEREO := .Env.ENABLE_STEREO | default "false" | toBool -}}
|
{{ $ENABLE_STEREO := .Env.ENABLE_STEREO | default "false" | toBool -}}
|
||||||
{{ $ENABLE_OPUS_RED := .Env.ENABLE_OPUS_RED | default "false" | toBool -}}
|
{{ $ENABLE_OPUS_RED := .Env.ENABLE_OPUS_RED | default "false" | toBool -}}
|
||||||
{{ $ENABLE_TALK_WHILE_MUTED := .Env.ENABLE_TALK_WHILE_MUTED | default "false" | toBool -}}
|
{{ $ENABLE_TALK_WHILE_MUTED := .Env.ENABLE_TALK_WHILE_MUTED | default "false" | toBool -}}
|
||||||
|
@ -37,8 +34,8 @@
|
||||||
{{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool }}
|
{{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool }}
|
||||||
{{ $HIDE_PREJOIN_DISPLAY_NAME := .Env.HIDE_PREJOIN_DISPLAY_NAME | default "false" | toBool -}}
|
{{ $HIDE_PREJOIN_DISPLAY_NAME := .Env.HIDE_PREJOIN_DISPLAY_NAME | default "false" | toBool -}}
|
||||||
{{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
|
{{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
|
||||||
{{ $RESOLUTION := .Env.RESOLUTION | default "1080" -}}
|
{{ $RESOLUTION := .Env.RESOLUTION | default "720" -}}
|
||||||
{{ $RESOLUTION_MIN := .Env.RESOLUTION_MIN | default "240" -}}
|
{{ $RESOLUTION_MIN := .Env.RESOLUTION_MIN | default "180" -}}
|
||||||
{{ $RESOLUTION_WIDTH := .Env.RESOLUTION_WIDTH | default "1280" -}}
|
{{ $RESOLUTION_WIDTH := .Env.RESOLUTION_WIDTH | default "1280" -}}
|
||||||
{{ $RESOLUTION_WIDTH_MIN := .Env.RESOLUTION_WIDTH_MIN | default "320" -}}
|
{{ $RESOLUTION_WIDTH_MIN := .Env.RESOLUTION_WIDTH_MIN | default "320" -}}
|
||||||
{{ $START_AUDIO_ONLY := .Env.START_AUDIO_ONLY | default "false" | toBool -}}
|
{{ $START_AUDIO_ONLY := .Env.START_AUDIO_ONLY | default "false" | toBool -}}
|
||||||
|
@ -49,14 +46,12 @@
|
||||||
{{ $ENABLE_NOISY_MIC_DETECTION := .Env.ENABLE_NOISY_MIC_DETECTION | default "true" | toBool -}}
|
{{ $ENABLE_NOISY_MIC_DETECTION := .Env.ENABLE_NOISY_MIC_DETECTION | default "true" | toBool -}}
|
||||||
{{ $START_VIDEO_MUTED := .Env.START_VIDEO_MUTED | default 10 -}}
|
{{ $START_VIDEO_MUTED := .Env.START_VIDEO_MUTED | default 10 -}}
|
||||||
{{ $START_WITH_VIDEO_MUTED := .Env.START_WITH_VIDEO_MUTED | default "false" | toBool -}}
|
{{ $START_WITH_VIDEO_MUTED := .Env.START_WITH_VIDEO_MUTED | default "false" | toBool -}}
|
||||||
|
{{ $DESKTOP_SHARING_FRAMERATE_AUTO := .Env.DESKTOP_SHARING_FRAMERATE_AUTO | default "true" | toBool -}}
|
||||||
{{ $DESKTOP_SHARING_FRAMERATE_MIN := .Env.DESKTOP_SHARING_FRAMERATE_MIN | default 5 -}}
|
{{ $DESKTOP_SHARING_FRAMERATE_MIN := .Env.DESKTOP_SHARING_FRAMERATE_MIN | default 5 -}}
|
||||||
{{ $DESKTOP_SHARING_FRAMERATE_MAX := .Env.DESKTOP_SHARING_FRAMERATE_MAX | default 5 -}}
|
{{ $DESKTOP_SHARING_FRAMERATE_MAX := .Env.DESKTOP_SHARING_FRAMERATE_MAX | default 5 -}}
|
||||||
{{ $TESTING_OCTO_PROBABILITY := .Env.TESTING_OCTO_PROBABILITY | default "0" -}}
|
|
||||||
{{ $TESTING_CAP_SCREENSHARE_BITRATE := .Env.TESTING_CAP_SCREENSHARE_BITRATE | default "1" -}}
|
|
||||||
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
|
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
|
||||||
{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
|
{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
|
||||||
{{ $DISABLE_DEEP_LINKING := .Env.DISABLE_DEEP_LINKING | default "false" | toBool -}}
|
{{ $DISABLE_DEEP_LINKING := .Env.DISABLE_DEEP_LINKING | default "false" | toBool -}}
|
||||||
{{ $VIDEOQUALITY_ENFORCE_PREFERRED_CODEC := .Env.VIDEOQUALITY_ENFORCE_PREFERRED_CODEC | default "false" | toBool -}}
|
|
||||||
{{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
|
{{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
|
||||||
{{ $DISABLE_REACTIONS := .Env.DISABLE_REACTIONS | default "false" | toBool -}}
|
{{ $DISABLE_REACTIONS := .Env.DISABLE_REACTIONS | default "false" | toBool -}}
|
||||||
{{ $DISABLE_REMOTE_VIDEO_MENU := .Env.DISABLE_REMOTE_VIDEO_MENU | default "false" | toBool -}}
|
{{ $DISABLE_REMOTE_VIDEO_MENU := .Env.DISABLE_REMOTE_VIDEO_MENU | default "false" | toBool -}}
|
||||||
|
@ -71,34 +66,40 @@
|
||||||
{{ $ROOM_PASSWORD_DIGITS := .Env.ROOM_PASSWORD_DIGITS | default "false" -}}
|
{{ $ROOM_PASSWORD_DIGITS := .Env.ROOM_PASSWORD_DIGITS | default "false" -}}
|
||||||
{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL := .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" -}}
|
{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL := .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" -}}
|
||||||
{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "false" | toBool -}}
|
{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "false" | toBool -}}
|
||||||
|
{{ $TESTING_AV1_SUPPORT := .Env.TESTING_AV1_SUPPORT | default "false" | toBool -}}
|
||||||
|
|
||||||
// Video configuration.
|
// Video configuration.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!config.hasOwnProperty('constraints')) config.constraints = {};
|
|
||||||
if (!config.constraints.hasOwnProperty('video')) config.constraints.video = {};
|
|
||||||
|
|
||||||
config.resolution = {{ $RESOLUTION }};
|
config.resolution = {{ $RESOLUTION }};
|
||||||
config.constraints.video.height = { ideal: {{ $RESOLUTION }}, max: {{ $RESOLUTION }}, min: {{ $RESOLUTION_MIN }} };
|
config.constraints = {
|
||||||
config.constraints.video.width = { ideal: {{ $RESOLUTION_WIDTH }}, max: {{ $RESOLUTION_WIDTH }}, min: {{ $RESOLUTION_WIDTH_MIN }}};
|
video: {
|
||||||
config.disableSimulcast = {{ not $ENABLE_SIMULCAST }};
|
height: { ideal: {{ $RESOLUTION }}, max: {{ $RESOLUTION }}, min: {{ $RESOLUTION_MIN }} },
|
||||||
|
width: { ideal: {{ $RESOLUTION_WIDTH }}, max: {{ $RESOLUTION_WIDTH }}, min: {{ $RESOLUTION_WIDTH_MIN }}},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
{{ if not $ENABLE_SIMULCAST -}}
|
||||||
|
config.disableSimulcast = true;
|
||||||
|
{{ end -}}
|
||||||
config.startVideoMuted = {{ $START_VIDEO_MUTED }};
|
config.startVideoMuted = {{ $START_VIDEO_MUTED }};
|
||||||
config.startWithVideoMuted = {{ $START_WITH_VIDEO_MUTED }};
|
config.startWithVideoMuted = {{ $START_WITH_VIDEO_MUTED }};
|
||||||
|
|
||||||
{{ if .Env.START_BITRATE -}}
|
config.flags = {
|
||||||
config.startBitrate = '{{ .Env.START_BITRATE }}';
|
sourceNameSignaling: true,
|
||||||
{{ end -}}
|
sendMultipleVideoStreams: true,
|
||||||
|
receiveMultipleVideoStreams: true
|
||||||
if (!config.hasOwnProperty('flags')) config.flags = {};
|
};
|
||||||
config.flags.sourceNameSignaling = true;
|
|
||||||
config.flags.sendMultipleVideoStreams = true;
|
|
||||||
config.flags.receiveMultipleVideoStreams = true;
|
|
||||||
|
|
||||||
|
|
||||||
// ScreenShare Configuration.
|
// ScreenShare Configuration.
|
||||||
//
|
//
|
||||||
|
|
||||||
config.desktopSharingFrameRate = { min: {{ $DESKTOP_SHARING_FRAMERATE_MIN }}, max: {{ $DESKTOP_SHARING_FRAMERATE_MAX }} };
|
{{ if not $DESKTOP_SHARING_FRAMERATE_AUTO -}}
|
||||||
|
config.desktopSharingFrameRate = {
|
||||||
|
min: {{ $DESKTOP_SHARING_FRAMERATE_MIN }},
|
||||||
|
max: {{ $DESKTOP_SHARING_FRAMERATE_MAX }}
|
||||||
|
};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
// Audio configuration.
|
// Audio configuration.
|
||||||
//
|
//
|
||||||
|
@ -107,8 +108,9 @@ config.enableNoAudioDetection = {{ $ENABLE_NO_AUDIO_DETECTION }};
|
||||||
config.enableTalkWhileMuted = {{ $ENABLE_TALK_WHILE_MUTED }};
|
config.enableTalkWhileMuted = {{ $ENABLE_TALK_WHILE_MUTED }};
|
||||||
config.disableAP = {{ not $ENABLE_AUDIO_PROCESSING }};
|
config.disableAP = {{ not $ENABLE_AUDIO_PROCESSING }};
|
||||||
|
|
||||||
if (!config.hasOwnProperty('audioQuality')) config.audioQuality = {};
|
config.audioQuality = {
|
||||||
config.audioQuality.stereo = {{ $ENABLE_STEREO }};
|
stereo: {{ $ENABLE_STEREO }}
|
||||||
|
};
|
||||||
|
|
||||||
{{ if .Env.AUDIO_QUALITY_OPUS_BITRATE -}}
|
{{ if .Env.AUDIO_QUALITY_OPUS_BITRATE -}}
|
||||||
config.audioQuality.opusMaxAverageBitrate = '{{ .Env.AUDIO_QUALITY_OPUS_BITRATE }}';
|
config.audioQuality.opusMaxAverageBitrate = '{{ .Env.AUDIO_QUALITY_OPUS_BITRATE }}';
|
||||||
|
@ -126,9 +128,9 @@ config.enableNoisyMicDetection = {{ $ENABLE_NOISY_MIC_DETECTION }};
|
||||||
// Peer-to-Peer options.
|
// Peer-to-Peer options.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!config.hasOwnProperty('p2p')) config.p2p = {};
|
config.p2p = {
|
||||||
|
enabled: {{ $ENABLE_P2P }}
|
||||||
config.p2p.enabled = {{ $ENABLE_P2P }};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Breakout Rooms
|
// Breakout Rooms
|
||||||
|
@ -154,28 +156,32 @@ config.etherpad_base = '{{ $PUBLIC_URL }}/etherpad/p/';
|
||||||
|
|
||||||
config.hiddenDomain = '{{ $XMPP_RECORDER_DOMAIN }}';
|
config.hiddenDomain = '{{ $XMPP_RECORDER_DOMAIN }}';
|
||||||
|
|
||||||
if (!config.hasOwnProperty('recordingService')) config.recordingService = {};
|
config.recordingService = {
|
||||||
|
// Whether to enable file recording or not using the "service" defined by the finalizer in Jibri
|
||||||
|
enabled: {{ $ENABLE_SERVICE_RECORDING }},
|
||||||
|
|
||||||
// Whether to enable file recording or not using the "service" defined by the finalizer in Jibri
|
// Whether to show the possibility to share file recording with other people
|
||||||
config.recordingService.enabled = {{ $ENABLE_SERVICE_RECORDING }};
|
// (e.g. meeting participants), based on the actual implementation
|
||||||
|
// on the backend.
|
||||||
// Whether to show the possibility to share file recording with other people
|
sharingEnabled: {{ $ENABLE_FILE_RECORDING_SHARING }}
|
||||||
// (e.g. meeting participants), based on the actual implementation
|
};
|
||||||
// on the backend.
|
|
||||||
config.recordingService.sharingEnabled = {{ $ENABLE_FILE_RECORDING_SHARING }};
|
|
||||||
|
|
||||||
// Live streaming configuration.
|
// Live streaming configuration.
|
||||||
if (!config.hasOwnProperty('liveStreaming')) config.liveStreaming = {};
|
config.liveStreaming = {
|
||||||
config.liveStreaming.enabled = {{ $ENABLE_LIVESTREAMING }};
|
enabled: {{ $ENABLE_LIVESTREAMING }},
|
||||||
config.liveStreaming.dataPrivacyLink= '{{ $ENABLE_LIVESTREAMING_DATA_PRIVACY_LINK }}';
|
dataPrivacyLink: '{{ $ENABLE_LIVESTREAMING_DATA_PRIVACY_LINK }}',
|
||||||
config.liveStreaming.helpLink= '{{ $ENABLE_LIVESTREAMING_HELP_LINK }}';
|
helpLink: '{{ $ENABLE_LIVESTREAMING_HELP_LINK }}',
|
||||||
config.liveStreaming.termsLink= '{{ $ENABLE_LIVESTREAMING_TERMS_LINK }}';
|
termsLink: '{{ $ENABLE_LIVESTREAMING_TERMS_LINK }}',
|
||||||
config.liveStreaming.validatorRegExpString= '{{ $ENABLE_LIVESTREAMING_VALIDATOR_REGEXP_STRING }}';
|
validatorRegExpString: '{{ $ENABLE_LIVESTREAMING_VALIDATOR_REGEXP_STRING }}'
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
{{ if .Env.DROPBOX_APPKEY -}}
|
{{ if .Env.DROPBOX_APPKEY -}}
|
||||||
// Enable the dropbox integration.
|
// Enable the dropbox integration.
|
||||||
if (!config.hasOwnProperty('dropbox')) config.dropbox = {};
|
config.dropbox = {
|
||||||
config.dropbox.appKey = '{{ .Env.DROPBOX_APPKEY }}';
|
appKey: '{{ .Env.DROPBOX_APPKEY }}'
|
||||||
|
};
|
||||||
|
|
||||||
{{ if .Env.DROPBOX_REDIRECT_URI -}}
|
{{ if .Env.DROPBOX_REDIRECT_URI -}}
|
||||||
// A URL to redirect the user to, after authenticating
|
// A URL to redirect the user to, after authenticating
|
||||||
// by default uses:
|
// by default uses:
|
||||||
|
@ -183,20 +189,21 @@ config.dropbox.appKey = '{{ .Env.DROPBOX_APPKEY }}';
|
||||||
config.dropbox.redirectURI = '{{ .Env.DROPBOX_REDIRECT_URI }}';
|
config.dropbox.redirectURI = '{{ .Env.DROPBOX_REDIRECT_URI }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
|
||||||
// Local recording configuration.
|
// Local recording configuration.
|
||||||
if (!config.hasOwnProperty('localRecording')) config.localRecording = {};
|
config.localRecording = {
|
||||||
config.localRecording.disable = {{ $DISABLE_LOCAL_RECORDING }};
|
disable: {{ $DISABLE_LOCAL_RECORDING }},
|
||||||
config.localRecording.notifyAllParticipants = {{ $ENABLE_LOCAL_RECORDING_NOTIFY_ALL_PARTICIPANT }};
|
notifyAllParticipants: {{ $ENABLE_LOCAL_RECORDING_NOTIFY_ALL_PARTICIPANT }},
|
||||||
config.localRecording.disableSelfRecording = {{ $ENABLE_LOCAL_RECORDING_SELF_START }};
|
disableSelfRecording: {{ $ENABLE_LOCAL_RECORDING_SELF_START }}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Analytics.
|
// Analytics.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!config.hasOwnProperty('analytics')) config.analytics = {};
|
config.analytics = {};
|
||||||
|
|
||||||
{{ if .Env.AMPLITUDE_ID -}}
|
{{ if .Env.AMPLITUDE_ID -}}
|
||||||
// The Amplitude APP Key:
|
// The Amplitude APP Key:
|
||||||
|
@ -227,24 +234,6 @@ config.analytics.scriptURLs = [ '{{ join "','" (splitList "," .Env.ANALYTICS_SCR
|
||||||
config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS) }}' ];
|
config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS) }}' ];
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Env.CALLSTATS_CUSTOM_SCRIPT_URL -}}
|
|
||||||
config.callStatsCustomScriptUrl = '{{ .Env.CALLSTATS_CUSTOM_SCRIPT_URL }}';
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{ if .Env.CALLSTATS_ID -}}
|
|
||||||
// To enable sending statistics to callstats.io you must provide the
|
|
||||||
// Application ID and Secret.
|
|
||||||
config.callStatsID = '{{ .Env.CALLSTATS_ID }}';
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{ if .Env.CALLSTATS_ID -}}
|
|
||||||
config.callStatsSecret = '{{ .Env.CALLSTATS_SECRET }}';
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
// Enables callstatsUsername to be reported as statsId and used
|
|
||||||
// by callstats as repoted remote id.
|
|
||||||
config.enableStatsID = {{ $ENABLE_STATS_ID }};
|
|
||||||
|
|
||||||
|
|
||||||
// Dial in/out services.
|
// Dial in/out services.
|
||||||
//
|
//
|
||||||
|
@ -301,11 +290,12 @@ config.peopleSearchQueryTypes = ['user','conferenceRooms'];
|
||||||
//
|
//
|
||||||
|
|
||||||
// Prejoin page.
|
// Prejoin page.
|
||||||
if (!config.hasOwnProperty('prejoinConfig')) config.prejoinConfig = {};
|
config.prejoinConfig = {
|
||||||
config.prejoinConfig.enabled = {{ $ENABLE_PREJOIN_PAGE }};
|
enabled: {{ $ENABLE_PREJOIN_PAGE }},
|
||||||
|
|
||||||
// Hides the participant name editing field in the prejoin screen.
|
// Hides the participant name editing field in the prejoin screen.
|
||||||
config.prejoinConfig.hideDisplayName = {{ $HIDE_PREJOIN_DISPLAY_NAME }};
|
hideDisplayName: {{ $HIDE_PREJOIN_DISPLAY_NAME }}
|
||||||
|
};
|
||||||
|
|
||||||
// List of buttons to hide from the extra join options dropdown on prejoin screen.
|
// List of buttons to hide from the extra join options dropdown on prejoin screen.
|
||||||
{{ if .Env.HIDE_PREJOIN_EXTRA_BUTTONS -}}
|
{{ if .Env.HIDE_PREJOIN_EXTRA_BUTTONS -}}
|
||||||
|
@ -313,7 +303,9 @@ config.prejoinConfig.hideExtraJoinButtons = [ '{{ join "','" (splitList "," .Env
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
// Welcome page.
|
// Welcome page.
|
||||||
config.enableWelcomePage = {{ $ENABLE_WELCOME_PAGE }};
|
config.welcomePage = {
|
||||||
|
disabled: {{ not $ENABLE_WELCOME_PAGE }}
|
||||||
|
};
|
||||||
|
|
||||||
// Close page.
|
// Close page.
|
||||||
config.enableClosePage = {{ $ENABLE_CLOSE_PAGE }};
|
config.enableClosePage = {{ $ENABLE_CLOSE_PAGE }};
|
||||||
|
@ -344,24 +336,26 @@ config.roomPasswordNumberOfDigits = {{ $ROOM_PASSWORD_DIGITS }};
|
||||||
// Advanced.
|
// Advanced.
|
||||||
//
|
//
|
||||||
|
|
||||||
// Lipsync hack in jicofo, may not be safe.
|
{{ if not $ENABLE_REMB -}}
|
||||||
config.enableLipSync = {{ $ENABLE_LIPSYNC }};
|
config.enableRemb = false;
|
||||||
|
{{ end -}}
|
||||||
|
{{ if not $ENABLE_TCC -}}
|
||||||
|
config.enableTcc = false;
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
config.enableRemb = {{ $ENABLE_REMB }};
|
|
||||||
config.enableTcc = {{ $ENABLE_TCC }};
|
|
||||||
|
|
||||||
// Enable IPv6 support.
|
|
||||||
config.useIPv6 = {{ $ENABLE_IPV6 }};
|
|
||||||
|
|
||||||
// Transcriptions (subtitles and buttons can be configured in interface_config)
|
// Transcriptions (subtitles and buttons can be configured in interface_config)
|
||||||
config.transcription = { enabled: {{ $ENABLE_TRANSCRIPTIONS }} };
|
config.transcription = {
|
||||||
config.transcription.translationLanguages = {{ $TRANSLATION_LANGUAGES }};
|
enabled: {{ $ENABLE_TRANSCRIPTIONS }},
|
||||||
config.transcription.translationLanguagesHead = {{ $TRANSLATION_LANGUAGES_HEAD }};
|
translationLanguages: {{ $TRANSLATION_LANGUAGES }},
|
||||||
config.transcription.useAppLanguage = {{ $USE_APP_LANGUAGE }};
|
translationLanguagesHead: {{ $TRANSLATION_LANGUAGES_HEAD }},
|
||||||
config.transcription.preferredLanguage = '{{ $PREFERRED_LANGUAGE }}';
|
useAppLanguage: {{ $USE_APP_LANGUAGE }},
|
||||||
config.transcription.disableStartForAll = {{ $DISABLE_START_FOR_ALL }};
|
preferredLanguage: '{{ $PREFERRED_LANGUAGE }}',
|
||||||
config.transcription.autoCaptionOnRecord = {{ $AUTO_CAPTION_ON_RECORD }};
|
disableStartForAll: {{ $DISABLE_START_FOR_ALL }},
|
||||||
|
autoCaptionOnRecord: {{ $AUTO_CAPTION_ON_RECORD }},
|
||||||
|
};
|
||||||
|
|
||||||
|
// Dynamic branding
|
||||||
{{ if .Env.DYNAMIC_BRANDING_URL -}}
|
{{ if .Env.DYNAMIC_BRANDING_URL -}}
|
||||||
// External API url used to receive branding specific information.
|
// External API url used to receive branding specific information.
|
||||||
config.dynamicBrandingUrl = '{{ .Env.DYNAMIC_BRANDING_URL }}';
|
config.dynamicBrandingUrl = '{{ .Env.DYNAMIC_BRANDING_URL }}';
|
||||||
|
@ -370,7 +364,7 @@ config.brandingDataUrl = '{{ .Env.BRANDING_DATA_URL }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Env.TOKEN_AUTH_URL -}}
|
{{ if .Env.TOKEN_AUTH_URL -}}
|
||||||
// Authenticate using external service or just focus external auth window if there is one already.
|
// Authenticate using external service
|
||||||
config.tokenAuthUrl = '{{ .Env.TOKEN_AUTH_URL }}';
|
config.tokenAuthUrl = '{{ .Env.TOKEN_AUTH_URL }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
@ -378,7 +372,7 @@ config.tokenAuthUrl = '{{ .Env.TOKEN_AUTH_URL }}';
|
||||||
// Deployment information.
|
// Deployment information.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!config.hasOwnProperty('deploymentInfo')) config.deploymentInfo = {};
|
config.deploymentInfo = {};
|
||||||
|
|
||||||
{{ if .Env.DEPLOYMENTINFO_ENVIRONMENT -}}
|
{{ if .Env.DEPLOYMENTINFO_ENVIRONMENT -}}
|
||||||
config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}';
|
config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}';
|
||||||
|
@ -400,16 +394,6 @@ config.deploymentInfo.region = '{{ .Env.DEPLOYMENTINFO_REGION }}';
|
||||||
config.deploymentInfo.userRegion = '{{ $DEPLOYMENTINFO_USERREGION }}';
|
config.deploymentInfo.userRegion = '{{ $DEPLOYMENTINFO_USERREGION }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
|
||||||
// Testing
|
|
||||||
//
|
|
||||||
|
|
||||||
if (!config.hasOwnProperty('testing')) config.testing = {};
|
|
||||||
if (!config.testing.hasOwnProperty('octo')) config.testing.octo = {};
|
|
||||||
|
|
||||||
config.testing.capScreenshareBitrate = {{ $TESTING_CAP_SCREENSHARE_BITRATE }};
|
|
||||||
config.testing.octo.probability = {{ $TESTING_OCTO_PROBABILITY }};
|
|
||||||
|
|
||||||
// Deep Linking
|
// Deep Linking
|
||||||
config.disableDeepLinking = {{ $DISABLE_DEEP_LINKING }};
|
config.disableDeepLinking = {{ $DISABLE_DEEP_LINKING }};
|
||||||
|
|
||||||
|
@ -418,26 +402,116 @@ config.disableDeepLinking = {{ $DISABLE_DEEP_LINKING }};
|
||||||
config.p2p.preferredCodec = '{{ .Env.P2P_PREFERRED_CODEC }}';
|
config.p2p.preferredCodec = '{{ .Env.P2P_PREFERRED_CODEC }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
// Enable preferred video Codec
|
// Video quality settings.
|
||||||
if (!config.hasOwnProperty('videoQuality')) config.videoQuality = {};
|
//
|
||||||
|
|
||||||
|
config.videoQuality = {};
|
||||||
{{ if .Env.VIDEOQUALITY_PREFERRED_CODEC -}}
|
{{ if .Env.VIDEOQUALITY_PREFERRED_CODEC -}}
|
||||||
config.videoQuality.preferredCodec = '{{ .Env.VIDEOQUALITY_PREFERRED_CODEC }}';
|
config.videoQuality.preferredCodec = '{{ .Env.VIDEOQUALITY_PREFERRED_CODEC }}';
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
config.videoQuality.enforcePreferredCodec = {{ $VIDEOQUALITY_ENFORCE_PREFERRED_CODEC }};
|
config.videoQuality.av1 = {};
|
||||||
|
|
||||||
if (!config.videoQuality.hasOwnProperty('maxBitratesVideo')) config.videoQuality.maxBitratesVideo = null;
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_LOW }}
|
||||||
{{ if and .Env.VIDEOQUALITY_BITRATE_H264_LOW .Env.VIDEOQUALITY_BITRATE_H264_STANDARD .Env.VIDEOQUALITY_BITRATE_H264_HIGH -}}
|
config.videoQuality.av1.low = {{ .Env.VIDEOQUALITY_BITRATE_AV1_LOW }};
|
||||||
config.videoQuality.maxBitratesVideo = config.videoQuality.maxBitratesVideo || {}
|
|
||||||
config.videoQuality.maxBitratesVideo.H264 = { low: {{ .Env.VIDEOQUALITY_BITRATE_H264_LOW }}, standard: {{ .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }}, high: {{ .Env.VIDEOQUALITY_BITRATE_H264_HIGH }} };
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ if and .Env.VIDEOQUALITY_BITRATE_VP8_LOW .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD .Env.VIDEOQUALITY_BITRATE_VP8_HIGH -}}
|
|
||||||
config.videoQuality.maxBitratesVideo = config.videoQuality.maxBitratesVideo || {}
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD }}
|
||||||
config.videoQuality.maxBitratesVideo.VP8 = { low: {{ .Env.VIDEOQUALITY_BITRATE_VP8_LOW }}, standard: {{ .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }}, high: {{ .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }} };
|
config.videoQuality.av1.standard = {{ .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD }};
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ if and .Env.VIDEOQUALITY_BITRATE_VP9_LOW .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD .Env.VIDEOQUALITY_BITRATE_VP9_HIGH -}}
|
|
||||||
config.videoQuality.maxBitratesVideo = config.videoQuality.maxBitratesVideo || {}
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_HIGH }}
|
||||||
config.videoQuality.maxBitratesVideo.VP9 = { low: {{ .Env.VIDEOQUALITY_BITRATE_VP9_LOW }}, standard: {{ .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }}, high: {{ .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }} };
|
config.videoQuality.av1.high = {{ .Env.VIDEOQUALITY_BITRATE_AV1_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_FULL }}
|
||||||
|
config.videoQuality.av1.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_AV1_FULL }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_ULTRA }}
|
||||||
|
config.videoQuality.av1.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_AV1_ULTRA }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH }}
|
||||||
|
config.videoQuality.av1.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
config.videoQuality.h264 = {};
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_LOW }}
|
||||||
|
config.videoQuality.h264.low = {{ .Env.VIDEOQUALITY_BITRATE_H264_LOW }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }}
|
||||||
|
config.videoQuality.h264.standard = {{ .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_HIGH }}
|
||||||
|
config.videoQuality.h264.high = {{ .Env.VIDEOQUALITY_BITRATE_H264_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_FULL }}
|
||||||
|
config.videoQuality.h264.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_H264_FULL }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_ULTRA }}
|
||||||
|
config.videoQuality.h264.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_H264_ULTRA }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH }}
|
||||||
|
config.videoQuality.h264.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
config.videoQuality.vp8 = {};
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_LOW }}
|
||||||
|
config.videoQuality.vp8.low = {{ .Env.VIDEOQUALITY_BITRATE_VP8_LOW }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }}
|
||||||
|
config.videoQuality.vp8.standard = {{ .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }}
|
||||||
|
config.videoQuality.vp8.high = {{ .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_FULL }}
|
||||||
|
config.videoQuality.vp8.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_VP8_FULL }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_ULTRA }}
|
||||||
|
config.videoQuality.vp8.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_VP8_ULTRA }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH }}
|
||||||
|
config.videoQuality.vp8.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
config.videoQuality.vp9 = {};
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_LOW }}
|
||||||
|
config.videoQuality.vp9.low = {{ .Env.VIDEOQUALITY_BITRATE_VP9_LOW }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }}
|
||||||
|
config.videoQuality.vp9.standard = {{ .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }}
|
||||||
|
config.videoQuality.vp9.high = {{ .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_FULL }}
|
||||||
|
config.videoQuality.vp9.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_VP9_FULL }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_ULTRA }}
|
||||||
|
config.videoQuality.vp9.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_VP9_ULTRA }};
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH }}
|
||||||
|
config.videoQuality.vp9.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH }};
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
// Reactions
|
// Reactions
|
||||||
|
@ -457,15 +531,18 @@ config.hiddenPremeetingButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREME
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
// Configure remote participant video menu
|
// Configure remote participant video menu
|
||||||
if (!config.hasOwnProperty('remoteVideoMenu')) config.remoteVideoMenu = {};
|
config.remoteVideoMenu = {
|
||||||
config.remoteVideoMenu.disabled = {{ $DISABLE_REMOTE_VIDEO_MENU }};
|
disabled: {{ $DISABLE_REMOTE_VIDEO_MENU }},
|
||||||
config.remoteVideoMenu.disableKick = {{ $DISABLE_KICKOUT }};
|
disableKick: {{ $DISABLE_KICKOUT }},
|
||||||
config.remoteVideoMenu.disableGrantModerator = {{ $DISABLE_GRANT_MODERATOR }};
|
disableGrantModerator: {{ $DISABLE_GRANT_MODERATOR }},
|
||||||
config.remoteVideoMenu.disablePrivateChat = {{ $DISABLE_PRIVATE_CHAT }};
|
disablePrivateChat: {{ $DISABLE_PRIVATE_CHAT }}
|
||||||
|
};
|
||||||
|
|
||||||
// Configure e2eping
|
// Configure e2eping
|
||||||
if (!config.hasOwnProperty('e2eping')) config.e2eping = {};
|
config.e2eping = {
|
||||||
config.e2eping.enabled = {{ $ENABLE_E2EPING }};
|
enabled: {{ $ENABLE_E2EPING }}
|
||||||
|
};
|
||||||
|
|
||||||
{{ if .Env.E2EPING_NUM_REQUESTS -}}
|
{{ if .Env.E2EPING_NUM_REQUESTS -}}
|
||||||
config.e2eping.numRequests = {{ .Env.E2EPING_NUM_REQUESTS }};
|
config.e2eping.numRequests = {{ .Env.E2EPING_NUM_REQUESTS }};
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -477,10 +554,15 @@ config.e2eping.maxMessagePerSecond = {{ .Env.E2EPING_MAX_MESSAGE_PER_SECOND }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
// Settings for the Excalidraw whiteboard integration.
|
// Settings for the Excalidraw whiteboard integration.
|
||||||
if (!config.hasOwnProperty('whiteboard')) config.whiteboard = {};
|
config.whiteboard = {
|
||||||
config.whiteboard.enabled = {{ $WHITEBOARD_ENABLED }};
|
enabled: {{ $WHITEBOARD_ENABLED }},
|
||||||
config.whiteboard.collabServerBaseUrl = '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
|
collabServerBaseUrl: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'
|
||||||
|
};
|
||||||
|
|
||||||
|
// Testing
|
||||||
|
config.testing = {
|
||||||
|
enableAv1Support: {{ $TESTING_AV1_SUPPORT }}
|
||||||
|
};
|
||||||
|
|
||||||
// CUSTOM ADJUSTMENTS
|
// CUSTOM ADJUSTMENTS
|
||||||
config.disableThirdPartyRequests = true;
|
config.disableThirdPartyRequests = true;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "c4k-jitsi",
|
"name": "c4k-jitsi",
|
||||||
"description": "Generate c4k yaml for a jitsi deployment.",
|
"description": "Generate c4k yaml for a jitsi deployment.",
|
||||||
"author": "meissa GmbH",
|
"author": "meissa GmbH",
|
||||||
"version": "1.5.1",
|
"version": "2.2.1-SNAPSHOT",
|
||||||
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-jitsi#readme",
|
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-jitsi#readme",
|
||||||
"repository": "https://www.npmjs.com/package/c4k-jitsi",
|
"repository": "https://www.npmjs.com/package/c4k-jitsi",
|
||||||
"license": "APACHE2",
|
"license": "APACHE2",
|
||||||
|
|
32
project.clj
32
project.clj
|
@ -1,16 +1,17 @@
|
||||||
(defproject org.domaindrivenarchitecture/c4k-jitsi "1.5.1"
|
(defproject org.domaindrivenarchitecture/c4k-jitsi "2.2.1-SNAPSHOT"
|
||||||
:description "jitsi c4k-installation package"
|
:description "jitsi c4k-installation package"
|
||||||
:url "https://domaindrivenarchitecture.org"
|
:url "https://domaindrivenarchitecture.org"
|
||||||
:license {:name "Apache License, Version 2.0"
|
:license {:name "Apache License, Version 2.0"
|
||||||
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
||||||
:dependencies [[org.clojure/clojure "1.11.1"]
|
:dependencies [[org.clojure/clojure "1.12.0"]
|
||||||
[org.clojure/tools.reader "1.3.6"]
|
[org.clojure/tools.reader "1.5.0"]
|
||||||
[org.domaindrivenarchitecture/c4k-common-clj "6.0.3"]
|
[org.domaindrivenarchitecture/c4k-common-clj "8.0.0"]
|
||||||
[hickory "0.7.1" :exclusions [viebel/codox-klipse-theme]]]
|
[hickory "0.7.1" :exclusions [viebel/codox-klipse-theme]]]
|
||||||
:target-path "target/%s/"
|
:target-path "target/%s/"
|
||||||
:source-paths ["src/main/cljc"
|
:source-paths ["src/main/cljc"
|
||||||
"src/main/clj"]
|
"src/main/clj"]
|
||||||
:resource-paths ["src/main/resources"]
|
:resource-paths ["src/main/resources"
|
||||||
|
"project.clj"]
|
||||||
:repositories [["snapshots" :clojars]
|
:repositories [["snapshots" :clojars]
|
||||||
["releases" :clojars]]
|
["releases" :clojars]]
|
||||||
:deploy-repositories [["snapshots" {:sign-releases false :url "https://clojars.org/repo"}]
|
:deploy-repositories [["snapshots" {:sign-releases false :url "https://clojars.org/repo"}]
|
||||||
|
@ -22,25 +23,14 @@
|
||||||
:uberjar {:aot :all
|
:uberjar {:aot :all
|
||||||
:main dda.c4k-jitsi.uberjar
|
:main dda.c4k-jitsi.uberjar
|
||||||
:uberjar-name "c4k-jitsi-standalone.jar"
|
:uberjar-name "c4k-jitsi-standalone.jar"
|
||||||
:dependencies [[org.clojure/tools.cli "1.0.219"]
|
:dependencies [[org.clojure/tools.cli "1.1.230"]
|
||||||
[ch.qos.logback/logback-classic "1.4.11"
|
[ch.qos.logback/logback-classic "1.5.12"
|
||||||
:exclusions [com.sun.mail/javax.mail]]
|
:exclusions [com.sun.mail/javax.mail]]
|
||||||
[org.slf4j/jcl-over-slf4j "2.0.9"]]}}
|
[org.slf4j/jcl-over-slf4j "2.0.16"]
|
||||||
|
[com.github.clj-easy/graal-build-time "1.0.5"]]}}
|
||||||
:release-tasks [["test"]
|
:release-tasks [["test"]
|
||||||
["vcs" "assert-committed"]
|
["vcs" "assert-committed"]
|
||||||
["change" "version" "leiningen.release/bump-version" "release"]
|
["change" "version" "leiningen.release/bump-version" "release"]
|
||||||
["vcs" "commit"]
|
["vcs" "commit"]
|
||||||
["vcs" "tag" "v" "--no-sign"]
|
["vcs" "tag" "v" "--no-sign"]
|
||||||
["change" "version" "leiningen.release/bump-version"]]
|
["change" "version" "leiningen.release/bump-version"]])
|
||||||
:aliases {"native" ["shell"
|
|
||||||
"native-image"
|
|
||||||
"--report-unsupported-elements-at-runtime"
|
|
||||||
"--initialize-at-build-time"
|
|
||||||
"-jar" "target/uberjar/c4k-jitsi-standalone.jar"
|
|
||||||
"-H:ResourceConfigurationFiles=graalvm-resource-config.json"
|
|
||||||
"-H:Log=registerResource"
|
|
||||||
"-H:Name=target/graalvm/${:name}"]
|
|
||||||
"inst" ["shell"
|
|
||||||
"sh"
|
|
||||||
"-c"
|
|
||||||
"lein uberjar && sudo install -m=755 target/uberjar/c4k-jitsi-standalone.jar /usr/local/bin/c4k-jitsi-standalone.jar"]})
|
|
|
@ -4,7 +4,7 @@
|
||||||
"src/test/cljc"
|
"src/test/cljc"
|
||||||
"src/test/cljs"
|
"src/test/cljs"
|
||||||
"src/test/resources"]
|
"src/test/resources"]
|
||||||
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "6.0.3"]
|
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "8.0.0"]
|
||||||
[hickory "0.7.1"]]
|
[hickory "0.7.1"]]
|
||||||
:builds {:frontend {:target :browser
|
:builds {:frontend {:target :browser
|
||||||
:modules {:main {:init-fn dda.c4k-jitsi.browser/init}}
|
:modules {:main {:init-fn dda.c4k-jitsi.browser/init}}
|
||||||
|
|
|
@ -5,10 +5,11 @@
|
||||||
[dda.c4k-jitsi.core :as core]))
|
[dda.c4k-jitsi.core :as core]))
|
||||||
|
|
||||||
(defn -main [& cmd-args]
|
(defn -main [& cmd-args]
|
||||||
(uberjar/main-common
|
(uberjar/main-cm
|
||||||
"c4k-jitsi"
|
"c4k-jitsi"
|
||||||
core/config?
|
core/config?
|
||||||
core/auth?
|
core/auth?
|
||||||
core/config-defaults
|
core/config-defaults
|
||||||
core/k8s-objects
|
core/config-objects
|
||||||
|
core/auth-objects
|
||||||
cmd-args))
|
cmd-args))
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
(ns dda.c4k-jitsi.core
|
(ns dda.c4k-jitsi.core
|
||||||
(:require
|
(:require
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
#?(:clj [orchestra.core :refer [defn-spec]]
|
#?(:clj [orchestra.core :refer [defn-spec]]
|
||||||
:cljs [orchestra.core :refer-macros [defn-spec]])
|
:cljs [orchestra.core :refer-macros [defn-spec]])
|
||||||
[dda.c4k-common.common :as cm]
|
[dda.c4k-common.common :as cm]
|
||||||
[dda.c4k-common.predicate :as cp]
|
[dda.c4k-common.predicate :as cp]
|
||||||
[dda.c4k-common.monitoring :as mon]
|
[dda.c4k-common.monitoring :as mon]
|
||||||
[dda.c4k-common.yaml :as yaml]
|
[dda.c4k-common.yaml :as yaml]
|
||||||
[dda.c4k-jitsi.jitsi :as jitsi]))
|
[dda.c4k-jitsi.jitsi :as jitsi]
|
||||||
|
[dda.c4k-common.namespace :as ns]))
|
||||||
|
|
||||||
(def config-defaults {:issuer "staging"})
|
(def config-defaults {:issuer "staging", :namespace "jitsi"})
|
||||||
|
|
||||||
(s/def ::mon-cfg ::mon/mon-cfg)
|
(s/def ::mon-cfg ::mon/mon-cfg)
|
||||||
(s/def ::mon-auth ::mon/mon-auth)
|
(s/def ::mon-auth ::mon/mon-auth)
|
||||||
|
@ -23,22 +24,36 @@
|
||||||
::jitsi/jicofo-component-secret]
|
::jitsi/jicofo-component-secret]
|
||||||
:opt-un [::mon-auth]))
|
:opt-un [::mon-auth]))
|
||||||
|
|
||||||
(defn-spec k8s-objects cp/map-or-seq?
|
(defn-spec config-objects cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(map yaml/to-string
|
||||||
|
(filter
|
||||||
|
#(not (nil? %))
|
||||||
|
(cm/concat-vec
|
||||||
|
(ns/generate config)
|
||||||
|
[(jitsi/generate-jvb-service config)
|
||||||
|
(jitsi/generate-web-service config)
|
||||||
|
(jitsi/generate-etherpad-service config)
|
||||||
|
(jitsi/generate-excalidraw-backend-service config)
|
||||||
|
(jitsi/generate-modelector-service config)
|
||||||
|
(jitsi/generate-deployment config)
|
||||||
|
(jitsi/generate-excalidraw-deployment config)
|
||||||
|
(jitsi/generate-modelector-deployment config)]
|
||||||
|
(jitsi/generate-ingress-web config)
|
||||||
|
(jitsi/generate-ingress-etherpad config)
|
||||||
|
(jitsi/generate-ingress-excalidraw-backend config)
|
||||||
|
(jitsi/generate-ingress-modelector config)
|
||||||
|
(when (:contains? config :mon-cfg)
|
||||||
|
(mon/generate-config))))))
|
||||||
|
|
||||||
|
(defn-spec auth-objects cp/map-or-seq?
|
||||||
[config config?
|
[config config?
|
||||||
auth auth?]
|
auth auth?]
|
||||||
(map yaml/to-string
|
(map yaml/to-string
|
||||||
(filter
|
(filter
|
||||||
#(not (nil? %))
|
#(not (nil? %))
|
||||||
(cm/concat-vec
|
(cm/concat-vec
|
||||||
[(jitsi/generate-secret-jitsi auth)
|
[(jitsi/generate-secret-jitsi config auth)]
|
||||||
(jitsi/generate-jvb-service)
|
|
||||||
(jitsi/generate-web-service)
|
|
||||||
(jitsi/generate-etherpad-service)
|
|
||||||
(jitsi/generate-excalidraw-backend-service)
|
|
||||||
(jitsi/generate-deployment config)
|
|
||||||
(jitsi/generate-excalidraw-deployment)]
|
|
||||||
(jitsi/generate-ingress-web config)
|
|
||||||
(jitsi/generate-ingress-etherpad config)
|
|
||||||
(jitsi/generate-ingress-excalidraw-backend config)
|
|
||||||
(when (:contains? config :mon-cfg)
|
(when (:contains? config :mon-cfg)
|
||||||
(mon/generate (:mon-cfg config) (:mon-auth auth)))))))
|
(mon/generate-auth (:mon-cfg config) (:mon-auth auth)))))))
|
||||||
|
|
||||||
|
|
|
@ -1,48 +1,41 @@
|
||||||
(ns dda.c4k-jitsi.jitsi
|
(ns dda.c4k-jitsi.jitsi
|
||||||
(:require
|
(:require
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
#?(:cljs [shadow.resource :as rc])
|
#?(:clj [orchestra.core :refer [defn-spec]]
|
||||||
#?(:clj [orchestra.core :refer [defn-spec]]
|
:cljs [orchestra.core :refer-macros [defn-spec]])
|
||||||
:cljs [orchestra.core :refer-macros [defn-spec]])
|
[dda.c4k-common.yaml :as yaml]
|
||||||
[dda.c4k-common.yaml :as yaml]
|
[dda.c4k-common.common :as cm]
|
||||||
[dda.c4k-common.common :as cm]
|
[dda.c4k-common.ingress :as ing]
|
||||||
[dda.c4k-common.ingress :as ing]
|
[dda.c4k-common.base64 :as b64]
|
||||||
[dda.c4k-common.base64 :as b64]
|
[dda.c4k-common.predicate :as cp]
|
||||||
[dda.c4k-common.predicate :as cp]))
|
#?(:cljs [dda.c4k-common.macros :refer-macros [inline-resources]])))
|
||||||
|
|
||||||
(s/def ::fqdn cp/fqdn-string?)
|
(s/def ::fqdn cp/fqdn-string?)
|
||||||
(s/def ::issuer cp/letsencrypt-issuer?)
|
(s/def ::issuer cp/letsencrypt-issuer?)
|
||||||
|
(s/def ::namespace string?)
|
||||||
(s/def ::jvb-auth-password cp/bash-env-string?)
|
(s/def ::jvb-auth-password cp/bash-env-string?)
|
||||||
(s/def ::jicofo-auth-password cp/bash-env-string?)
|
(s/def ::jicofo-auth-password cp/bash-env-string?)
|
||||||
(s/def ::jicofo-component-secret cp/bash-env-string?)
|
(s/def ::jicofo-component-secret cp/bash-env-string?)
|
||||||
|
|
||||||
(def config? (s/keys :req-un [::fqdn]
|
(def config? (s/keys :req-un [::fqdn]
|
||||||
:opt-un [::issuer]))
|
:opt-un [::issuer
|
||||||
|
::namespace]))
|
||||||
|
|
||||||
(def auth? (s/keys :req-un [::jvb-auth-password
|
(def auth? (s/keys :req-un [::jvb-auth-password
|
||||||
::jicofo-auth-password
|
::jicofo-auth-password
|
||||||
::jicofo-component-secret]))
|
::jicofo-component-secret]))
|
||||||
|
|
||||||
#?(:cljs
|
#?(:cljs
|
||||||
(defmethod yaml/load-resource :jitsi [resource-name]
|
(defmethod yaml/load-resource :jitsi [resource-name]
|
||||||
(case resource-name
|
(get (inline-resources "jitsi") resource-name)))
|
||||||
"jitsi/deployment.yaml" (rc/inline "jitsi/deployment.yaml")
|
|
||||||
"jitsi/etherpad-service.yaml" (rc/inline "jitsi/etherpad-service.yaml")
|
|
||||||
"jitsi/jvb-service.yaml" (rc/inline "jitsi/jvb-service.yaml")
|
|
||||||
"jitsi/excalidraw-backend-service.yaml" (rc/inline "jitsi/excalidraw-backend-service.yaml")
|
|
||||||
"jitsi/excalidraw-deployment.yaml" (rc/inline "jitsi/excalidraw-deployment.yaml")
|
|
||||||
"jitsi/secret.yaml" (rc/inline "jitsi/secret.yaml")
|
|
||||||
"jitsi/web-service.yaml" (rc/inline "jitsi/web-service.yaml")
|
|
||||||
(throw (js/Error. "Undefined Resource!")))))
|
|
||||||
|
|
||||||
(defn-spec generate-ingress-web cp/map-or-seq?
|
(defn-spec generate-ingress-web cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
(ing/generate-ingress-and-cert
|
(ing/generate-ingress-and-cert
|
||||||
(merge
|
(merge
|
||||||
{:service-name "web"
|
{:service-name "web"
|
||||||
:service-port 80
|
:service-port 80
|
||||||
:fqdns [(:fqdn config)]}
|
:fqdns [(:fqdn config)]}
|
||||||
config)))
|
config)))
|
||||||
|
|
||||||
(defn-spec generate-ingress-etherpad cp/map-or-seq?
|
(defn-spec generate-ingress-etherpad cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
|
@ -62,37 +55,85 @@
|
||||||
:fqdns [(str "excalidraw-backend." (:fqdn config))]}
|
:fqdns [(str "excalidraw-backend." (:fqdn config))]}
|
||||||
config)))
|
config)))
|
||||||
|
|
||||||
|
(defn-spec generate-ingress-modelector cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(ing/generate-ingress-and-cert
|
||||||
|
(merge
|
||||||
|
{:service-name "modelector"
|
||||||
|
:service-port 80
|
||||||
|
:fqdns [(str "modelector." (:fqdn config))]}
|
||||||
|
config)))
|
||||||
|
|
||||||
(defn-spec generate-secret-jitsi cp/map-or-seq?
|
(defn-spec generate-secret-jitsi cp/map-or-seq?
|
||||||
[auth auth?]
|
[config config?
|
||||||
(let [{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} auth]
|
auth auth?]
|
||||||
|
(let [{:keys [namespace]} config
|
||||||
|
{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} auth]
|
||||||
(->
|
(->
|
||||||
(yaml/from-string (yaml/load-resource "jitsi/secret.yaml"))
|
(yaml/from-string (yaml/load-resource "jitsi/secret.yaml"))
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace)
|
||||||
(cm/replace-key-value :JVB_AUTH_PASSWORD (b64/encode jvb-auth-password))
|
(cm/replace-key-value :JVB_AUTH_PASSWORD (b64/encode jvb-auth-password))
|
||||||
(cm/replace-key-value :JICOFO_AUTH_PASSWORD (b64/encode jicofo-auth-password))
|
(cm/replace-key-value :JICOFO_AUTH_PASSWORD (b64/encode jicofo-auth-password))
|
||||||
(cm/replace-key-value :JICOFO_COMPONENT_SECRET (b64/encode jicofo-component-secret)))))
|
(cm/replace-key-value :JICOFO_COMPONENT_SECRET (b64/encode jicofo-component-secret)))))
|
||||||
|
|
||||||
(defn-spec generate-jvb-service cp/map-or-seq? []
|
(defn-spec generate-jvb-service cp/map-or-seq?
|
||||||
(yaml/from-string (yaml/load-resource "jitsi/jvb-service.yaml")))
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/from-string (yaml/load-resource "jitsi/jvb-service.yaml"))
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
(defn-spec generate-web-service cp/map-or-seq? []
|
(defn-spec generate-web-service cp/map-or-seq?
|
||||||
(yaml/load-as-edn "jitsi/web-service.yaml"))
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/web-service.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
(defn-spec generate-etherpad-service cp/map-or-seq? []
|
(defn-spec generate-etherpad-service cp/map-or-seq?
|
||||||
(yaml/load-as-edn "jitsi/etherpad-service.yaml"))
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/etherpad-service.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
(defn-spec generate-excalidraw-backend-service cp/map-or-seq? []
|
(defn-spec generate-excalidraw-backend-service cp/map-or-seq?
|
||||||
(yaml/load-as-edn "jitsi/excalidraw-backend-service.yaml"))
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/excalidraw-backend-service.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
|
(defn-spec generate-modelector-service cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/modelector-service.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
(defn-spec generate-deployment cp/map-or-seq?
|
(defn-spec generate-deployment cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
(let [{:keys [fqdn]} config]
|
(let [{:keys [fqdn namespace]} config]
|
||||||
(->
|
(->
|
||||||
(yaml/load-as-edn "jitsi/deployment.yaml")
|
(yaml/load-as-edn "jitsi/deployment.yaml")
|
||||||
(cm/replace-all-matching-values-by-new-value "REPLACE_JITSI_FQDN" fqdn)
|
(cm/replace-all-matching "REPLACE_JITSI_FQDN" fqdn)
|
||||||
(cm/replace-all-matching-values-by-new-value "REPLACE_ETHERPAD_URL"
|
(cm/replace-all-matching "NAMESPACE" namespace)
|
||||||
(str "https://etherpad." fqdn "/p/"))
|
(cm/replace-all-matching "REPLACE_ETHERPAD_URL"
|
||||||
(cm/replace-all-matching-values-by-new-value "REPLACE_EXCALIDRAW_BACKEND_URL"
|
(str "https://etherpad." fqdn "/p/"))
|
||||||
(str "https://excalidraw-backend." fqdn)))))
|
|
||||||
|
|
||||||
(defn-spec generate-excalidraw-deployment cp/map-or-seq? []
|
(cm/replace-all-matching "REPLACE_EXCALIDRAW_BACKEND_URL"
|
||||||
(yaml/load-as-edn "jitsi/excalidraw-deployment.yaml"))
|
(str "https://excalidraw-backend." fqdn)))))
|
||||||
|
|
||||||
|
(defn-spec generate-excalidraw-deployment cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(let [{:keys [fqdn namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/excalidraw-deployment.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
|
(defn-spec generate-modelector-deployment cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(let [{:keys [fqdn namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/load-as-edn "jitsi/modelector-deployment.yaml")
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
|
@ -4,6 +4,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: jitsi
|
app: jitsi
|
||||||
name: jitsi
|
name: jitsi
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
@ -17,7 +18,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: jicofo
|
- name: jicofo
|
||||||
image: jitsi/jicofo:stable-8922-1
|
image: jitsi/jicofo:stable-9646
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: XMPP_SERVER
|
- name: XMPP_SERVER
|
||||||
|
@ -37,7 +38,7 @@ spec:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Europe/Berlin
|
value: Europe/Berlin
|
||||||
- name: prosody
|
- name: prosody
|
||||||
image: jitsi/prosody:stable-8922-1
|
image: jitsi/prosody:stable-9646
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: PUBLIC_URL
|
- name: PUBLIC_URL
|
||||||
|
@ -101,8 +102,10 @@ spec:
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: WHITEBOARD_COLLAB_SERVER_PUBLIC_URL
|
- name: WHITEBOARD_COLLAB_SERVER_PUBLIC_URL
|
||||||
value: REPLACE_EXCALIDRAW_BACKEND_URL
|
value: REPLACE_EXCALIDRAW_BACKEND_URL
|
||||||
|
- name: COLIBRI_WEBSOCKET_REGEX
|
||||||
|
value: "127.0.0.1"
|
||||||
- name: jvb
|
- name: jvb
|
||||||
image: jitsi/jvb:stable-8922-1
|
image: jitsi/jvb:stable-9646
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: PUBLIC_URL
|
- name: PUBLIC_URL
|
||||||
|
@ -132,7 +135,7 @@ spec:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Europe/Berlin
|
value: Europe/Berlin
|
||||||
- name: etherpad
|
- name: etherpad
|
||||||
image: etherpad/etherpad:1.9.2
|
image: etherpad/etherpad:2
|
||||||
env:
|
env:
|
||||||
- name: XMPP_SERVER
|
- name: XMPP_SERVER
|
||||||
value: localhost
|
value: localhost
|
||||||
|
|
|
@ -4,6 +4,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
service: etherpad
|
service: etherpad
|
||||||
name: etherpad
|
name: etherpad
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: etherpad
|
- name: etherpad
|
||||||
|
|
|
@ -4,6 +4,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
service: excalidraw-backend
|
service: excalidraw-backend
|
||||||
name: excalidraw-backend
|
name: excalidraw-backend
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: excalidraw-backend
|
- name: excalidraw-backend
|
||||||
|
|
|
@ -4,6 +4,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: excalidraw-backend
|
app: excalidraw-backend
|
||||||
name: excalidraw-backend
|
name: excalidraw-backend
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
|
|
@ -7,6 +7,7 @@ metadata:
|
||||||
metallb.universe.tf/allow-shared-ip: "shared-ip-service-group"
|
metallb.universe.tf/allow-shared-ip: "shared-ip-service-group"
|
||||||
metallb.universe.tf/address-pool: public
|
metallb.universe.tf/address-pool: public
|
||||||
name: jvb-udp
|
name: jvb-udp
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
|
|
26
src/main/resources/jitsi/modelector-deployment.yaml
Normal file
26
src/main/resources/jitsi/modelector-deployment.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: modelector
|
||||||
|
name: modelector
|
||||||
|
namespace: NAMESPACE
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: modelector
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: modelector
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: modelector
|
||||||
|
image: domaindrivenarchitecture/moderator-election-vaadin_fullstack
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: MEMBERNAMES
|
||||||
|
value: "Micha,Ansgar,Erik,Mirco"
|
14
src/main/resources/jitsi/modelector-service.yaml
Normal file
14
src/main/resources/jitsi/modelector-service.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
service: modelector
|
||||||
|
name: modelector
|
||||||
|
namespace: NAMESPACE
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
app: modelector
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: jitsi-config
|
name: jitsi-config
|
||||||
|
namespace: NAMESPACE
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
JVB_AUTH_PASSWORD: "jvb-auth"
|
JVB_AUTH_PASSWORD: "jvb-auth"
|
||||||
|
|
|
@ -4,6 +4,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
service: web
|
service: web
|
||||||
name: web
|
name: web
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: "http"
|
- name: "http"
|
||||||
|
|
|
@ -5,12 +5,18 @@
|
||||||
[clojure.spec.test.alpha :as st]
|
[clojure.spec.test.alpha :as st]
|
||||||
[dda.c4k-jitsi.jitsi :as cut]))
|
[dda.c4k-jitsi.jitsi :as cut]))
|
||||||
|
|
||||||
(st/instrument)
|
(st/instrument `cut/generate-deployment)
|
||||||
|
(st/instrument `cut/generate-secret-jitsi)
|
||||||
|
(st/instrument `cut/generate-ingress-web)
|
||||||
|
(st/instrument `cut/generate-jvb-service)
|
||||||
|
|
||||||
(deftest should-generate-deployment
|
(deftest should-generate-deployment
|
||||||
(is (= {:apiVersion "apps/v1",
|
(is (= {:apiVersion "apps/v1",
|
||||||
:kind "Deployment",
|
:kind "Deployment",
|
||||||
:metadata {:labels {:app "jitsi"}, :name "jitsi"},
|
:metadata
|
||||||
|
{:labels {:app "jitsi"},
|
||||||
|
:name "jitsi"
|
||||||
|
:namespace "jitsi"},
|
||||||
:spec
|
:spec
|
||||||
{:strategy {:type "Recreate"},
|
{:strategy {:type "Recreate"},
|
||||||
:selector {:matchLabels {:app "jitsi"}},
|
:selector {:matchLabels {:app "jitsi"}},
|
||||||
|
@ -19,7 +25,7 @@
|
||||||
:spec
|
:spec
|
||||||
{:containers
|
{:containers
|
||||||
[{:name "jicofo",
|
[{:name "jicofo",
|
||||||
:image "jitsi/jicofo:stable-8922-1",
|
:image "jitsi/jicofo:stable-9646",
|
||||||
:imagePullPolicy "IfNotPresent",
|
:imagePullPolicy "IfNotPresent",
|
||||||
:env
|
:env
|
||||||
[{:name "XMPP_SERVER", :value "localhost"}
|
[{:name "XMPP_SERVER", :value "localhost"}
|
||||||
|
@ -29,7 +35,7 @@
|
||||||
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
||||||
{:name "TZ", :value "Europe/Berlin"}]}
|
{:name "TZ", :value "Europe/Berlin"}]}
|
||||||
{:name "prosody",
|
{:name "prosody",
|
||||||
:image "jitsi/prosody:stable-8922-1",
|
:image "jitsi/prosody:stable-9646",
|
||||||
:imagePullPolicy "IfNotPresent",
|
:imagePullPolicy "IfNotPresent",
|
||||||
:env
|
:env
|
||||||
[{:name "PUBLIC_URL", :value "xy.xy.xy"}
|
[{:name "PUBLIC_URL", :value "xy.xy.xy"}
|
||||||
|
@ -60,9 +66,10 @@
|
||||||
{:name "DISABLE_AUDIO_LEVELS", :value "true"}
|
{:name "DISABLE_AUDIO_LEVELS", :value "true"}
|
||||||
{:name "ETHERPAD_PUBLIC_URL", :value "https://etherpad.xy.xy.xy/p/"}
|
{:name "ETHERPAD_PUBLIC_URL", :value "https://etherpad.xy.xy.xy/p/"}
|
||||||
{:name "WHITEBOARD_ENABLED", :value "true"}
|
{:name "WHITEBOARD_ENABLED", :value "true"}
|
||||||
{:name "WHITEBOARD_COLLAB_SERVER_PUBLIC_URL", :value "https://excalidraw-backend.xy.xy.xy"}]}
|
{:name "WHITEBOARD_COLLAB_SERVER_PUBLIC_URL", :value "https://excalidraw-backend.xy.xy.xy"}
|
||||||
|
{:name "COLIBRI_WEBSOCKET_REGEX", :value "127.0.0.1"}]}
|
||||||
{:name "jvb",
|
{:name "jvb",
|
||||||
:image "jitsi/jvb:stable-8922-1",
|
:image "jitsi/jvb:stable-9646",
|
||||||
:imagePullPolicy "IfNotPresent",
|
:imagePullPolicy "IfNotPresent",
|
||||||
:env
|
:env
|
||||||
[{:name "PUBLIC_URL", :value "xy.xy.xy"}
|
[{:name "PUBLIC_URL", :value "xy.xy.xy"}
|
||||||
|
@ -76,7 +83,7 @@
|
||||||
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
||||||
{:name "TZ", :value "Europe/Berlin"}]}
|
{:name "TZ", :value "Europe/Berlin"}]}
|
||||||
{:name "etherpad",
|
{:name "etherpad",
|
||||||
:image "etherpad/etherpad:1.9.2",
|
:image "etherpad/etherpad:2",
|
||||||
:env
|
:env
|
||||||
[{:name "XMPP_SERVER", :value "localhost"}
|
[{:name "XMPP_SERVER", :value "localhost"}
|
||||||
{:name "JICOFO_COMPONENT_SECRET",
|
{:name "JICOFO_COMPONENT_SECRET",
|
||||||
|
@ -84,17 +91,210 @@
|
||||||
{:name "JICOFO_AUTH_USER", :value "focus"}
|
{:name "JICOFO_AUTH_USER", :value "focus"}
|
||||||
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
{:name "JICOFO_AUTH_PASSWORD", :valueFrom {:secretKeyRef {:name "jitsi-config", :key "JICOFO_AUTH_PASSWORD"}}}
|
||||||
{:name "TZ", :value "Europe/Berlin"}]}]}}}}
|
{:name "TZ", :value "Europe/Berlin"}]}]}}}}
|
||||||
(cut/generate-deployment {:fqdn "xy.xy.xy"}))))
|
(cut/generate-deployment {:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
(deftest should-generate-secret
|
(deftest should-generate-secret
|
||||||
(is (= {:apiVersion "v1",
|
(is (= {:apiVersion "v1",
|
||||||
:kind "Secret",
|
:kind "Secret",
|
||||||
:metadata {:name "jitsi-config"},
|
:metadata
|
||||||
|
{:name "jitsi-config"
|
||||||
|
:namespace "jitsi"},
|
||||||
:type "Opaque",
|
:type "Opaque",
|
||||||
:data
|
:data
|
||||||
{:JVB_AUTH_PASSWORD "anZiLWF1dGg=",
|
{:JVB_AUTH_PASSWORD "anZiLWF1dGg=",
|
||||||
:JICOFO_AUTH_PASSWORD "amljb2ZvLWF1dGg=",
|
:JICOFO_AUTH_PASSWORD "amljb2ZvLWF1dGg=",
|
||||||
:JICOFO_COMPONENT_SECRET "amljb2ZvLWNvbXA="}}
|
:JICOFO_COMPONENT_SECRET "amljb2ZvLWNvbXA="}}
|
||||||
(cut/generate-secret-jitsi {:jvb-auth-password "jvb-auth"
|
(cut/generate-secret-jitsi
|
||||||
:jicofo-auth-password "jicofo-auth"
|
{:fqdn "xy.xy.xy"
|
||||||
:jicofo-component-secret "jicofo-comp"}))))
|
:namespace "jitsi"}
|
||||||
|
{:jvb-auth-password "jvb-auth"
|
||||||
|
:jicofo-auth-password "jicofo-auth"
|
||||||
|
:jicofo-component-secret "jicofo-comp"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-ingress-web
|
||||||
|
(is (= [{:apiVersion "cert-manager.io/v1",
|
||||||
|
:kind "Certificate",
|
||||||
|
:metadata
|
||||||
|
{:name "web",
|
||||||
|
:labels {:app.kubernetes.part-of "web"},
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:secretName "web",
|
||||||
|
:commonName "xy.xy.xy",
|
||||||
|
:duration "2160h",
|
||||||
|
:renewBefore "720h",
|
||||||
|
:dnsNames ["xy.xy.xy"],
|
||||||
|
:issuerRef {:name "staging", :kind "ClusterIssuer"}}}
|
||||||
|
{:apiVersion "networking.k8s.io/v1",
|
||||||
|
:kind "Ingress",
|
||||||
|
:metadata
|
||||||
|
{:namespace "jitsi",
|
||||||
|
:annotations
|
||||||
|
{:traefik.ingress.kubernetes.io/router.entrypoints "web, websecure",
|
||||||
|
:traefik.ingress.kubernetes.io/router.middlewares
|
||||||
|
"default-redirect-https@kubernetescrd",
|
||||||
|
:metallb.universe.tf/address-pool "public"},
|
||||||
|
:name "web",
|
||||||
|
:labels {:app.kubernetes.part-of "web"}},
|
||||||
|
:spec
|
||||||
|
{:tls [{:hosts ["xy.xy.xy"], :secretName "web"}],
|
||||||
|
:rules
|
||||||
|
[{:host "xy.xy.xy",
|
||||||
|
:http
|
||||||
|
{:paths
|
||||||
|
[{:pathType "Prefix",
|
||||||
|
:path "/",
|
||||||
|
:backend {:service {:name "web", :port {:number 80}}}}]}}]}}]
|
||||||
|
(cut/generate-ingress-web
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-ingress-modelector
|
||||||
|
(is (= [{:apiVersion "cert-manager.io/v1",
|
||||||
|
:kind "Certificate",
|
||||||
|
:metadata
|
||||||
|
{:name "modelector",
|
||||||
|
:labels {:app.kubernetes.part-of "modelector"},
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:secretName "modelector",
|
||||||
|
:commonName "modelector.xy.xy",
|
||||||
|
:duration "2160h",
|
||||||
|
:renewBefore "720h",
|
||||||
|
:dnsNames ["modelector.xy.xy"],
|
||||||
|
:issuerRef {:name "staging", :kind "ClusterIssuer"}}}
|
||||||
|
{:apiVersion "networking.k8s.io/v1",
|
||||||
|
:kind "Ingress",
|
||||||
|
:metadata
|
||||||
|
{:namespace "jitsi",
|
||||||
|
:annotations
|
||||||
|
{:traefik.ingress.kubernetes.io/router.entrypoints "web, websecure",
|
||||||
|
:traefik.ingress.kubernetes.io/router.middlewares
|
||||||
|
"default-redirect-https@kubernetescrd",
|
||||||
|
:metallb.universe.tf/address-pool "public"},
|
||||||
|
:name "modelector",
|
||||||
|
:labels {:app.kubernetes.part-of "modelector"}},
|
||||||
|
:spec
|
||||||
|
{:tls [{:hosts ["modelector.xy.xy"], :secretName "modelector"}],
|
||||||
|
:rules
|
||||||
|
[{:host "modelector.xy.xy",
|
||||||
|
:http
|
||||||
|
{:paths
|
||||||
|
[{:pathType "Prefix",
|
||||||
|
:path "/",
|
||||||
|
:backend {:service {:name "modelector", :port {:number 80}}}}]}}]}}]
|
||||||
|
(cut/generate-ingress-modelector
|
||||||
|
{:fqdn "xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-jvb-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "jvb"},
|
||||||
|
:annotations
|
||||||
|
#:metallb.universe.tf{:allow-shared-ip "shared-ip-service-group",
|
||||||
|
:address-pool "public"},
|
||||||
|
:name "jvb-udp"
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:type "LoadBalancer",
|
||||||
|
:ports
|
||||||
|
[{:port 30300, :protocol "UDP", :targetPort 30300, :nodePort 30300}],
|
||||||
|
:selector {:app "jitsi"}}}
|
||||||
|
(cut/generate-jvb-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-web-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata {:labels {:service "web"}, :name "web", :namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:ports
|
||||||
|
[{:name "http", :port 80, :targetPort 80}
|
||||||
|
{:name "https", :port 443, :targetPort 443}],
|
||||||
|
:selector {:app "jitsi"}}}
|
||||||
|
(cut/generate-web-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-etherpad-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "etherpad"}, :name "etherpad", :namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:ports [{:name "etherpad", :port 9001, :targetPort 9001}],
|
||||||
|
:selector {:app "jitsi"}}}
|
||||||
|
(cut/generate-etherpad-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-excalidraw-backend-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "excalidraw-backend"},
|
||||||
|
:name "excalidraw-backend",
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:ports [{:name "excalidraw-backend", :port 3002, :targetPort 80}],
|
||||||
|
:selector {:app "excalidraw-backend"}}}
|
||||||
|
(cut/generate-excalidraw-backend-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-modelector-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "modelector"},
|
||||||
|
:name "modelector",
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:ports [{:name "http", :port 80, :targetPort 8080}],
|
||||||
|
:selector {:app "modelector"}}}
|
||||||
|
(cut/generate-modelector-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-modelector-deployment
|
||||||
|
(is (= {:apiVersion "apps/v1",
|
||||||
|
:kind "Deployment",
|
||||||
|
:metadata
|
||||||
|
{:labels {:app "modelector"},
|
||||||
|
:name "modelector",
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:selector {:matchLabels {:app "modelector"}},
|
||||||
|
:replicas 1,
|
||||||
|
:strategy {:type "Recreate"},
|
||||||
|
:template
|
||||||
|
{:metadata {:labels {:app "modelector"}},
|
||||||
|
:spec
|
||||||
|
{:containers
|
||||||
|
[{:name "modelector",
|
||||||
|
:image "domaindrivenarchitecture/moderator-election-vaadin_fullstack",
|
||||||
|
:imagePullPolicy "IfNotPresent",
|
||||||
|
:env
|
||||||
|
[{:name "MEMBERNAMES",
|
||||||
|
:value "Micha,Ansgar,Erik,Mirco"}]}]}}}}
|
||||||
|
(cut/generate-modelector-deployment
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-excalidraw-deployment
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "excalidraw-backend"},
|
||||||
|
:name "excalidraw-backend",
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:ports [{:name "excalidraw-backend", :port 3002, :targetPort 80}],
|
||||||
|
:selector {:app "excalidraw-backend"}}}
|
||||||
|
(cut/generate-excalidraw-backend-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
Loading…
Reference in a new issue