From 237fc76d7aa9ca4d7523b241cd34b60bf5ab1606 Mon Sep 17 00:00:00 2001 From: msantos Date: Tue, 27 Aug 2024 13:31:36 +0200 Subject: [PATCH] Add config files for UFPB LabCheck --- config.websocket.ufpb-labcheck.yaml | 4 +++ .../config/config-file/ufpb-labcheck.pkl | 16 +++++++++++ deployment/k8s/ufpb-labcheck.pkl | 28 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 config.websocket.ufpb-labcheck.yaml create mode 100644 deployment/config/config-file/ufpb-labcheck.pkl create mode 100644 deployment/k8s/ufpb-labcheck.pkl diff --git a/config.websocket.ufpb-labcheck.yaml b/config.websocket.ufpb-labcheck.yaml new file mode 100644 index 000000000..4f78a82b8 --- /dev/null +++ b/config.websocket.ufpb-labcheck.yaml @@ -0,0 +1,4 @@ +services: + - name: websocket-aletheia-development + conf: + port: 5051 diff --git a/deployment/config/config-file/ufpb-labcheck.pkl b/deployment/config/config-file/ufpb-labcheck.pkl new file mode 100644 index 000000000..5ff29b06c --- /dev/null +++ b/deployment/config/config-file/ufpb-labcheck.pkl @@ -0,0 +1,16 @@ +amends "./modules/main.pkl" +import "./modules/database/mongodb.pkl" +appBaseUrl = "aletheiafact.org" + +var = new { + name = "aletheia-ufpb-labcheck" + conf { + cors = "*" + recaptcha_sitekey = "6Lc2BtYUAAAAAOUBI-9r1sDJUIfG2nt6C43noOXh" + websocketUrl = "wss://testws.\(appBaseUrl) " + baseUrl = "https://labcheck.\(appBaseUrl)" + db = (mongodb) { + atlas = true + } + } +} diff --git a/deployment/k8s/ufpb-labcheck.pkl b/deployment/k8s/ufpb-labcheck.pkl new file mode 100644 index 000000000..cfbb5893f --- /dev/null +++ b/deployment/k8s/ufpb-labcheck.pkl @@ -0,0 +1,28 @@ +amends "./app.pkl" +import "package://pkg.pkl-lang.org/pkl-k8s/k8s@1.0.1#/K8sResource.pkl" +import "./modules/ingress.pkl" as ingress +import "./modules/aletheia.pkl" + +appNamespace = "ufpb-labcheck" +podPort = 3000 + +local newAletheia = new (aletheia) { + ns = appNamespace + p = podPort +} + +IngressOptions { + rules { + (ingress.rule) { + host = "labcheck.aletheiafact.org" + } + } +} + +DeploymentOptions { + containers { + (newAletheia.pod.container) { + name = "aletheia" + } + } +}