Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cb39096
Updated install scripts.
vladd-bit Nov 20, 2026
29f28f1
Updated install scripts to include kubectl cluster setup.
vladd-bit Nov 20, 2026
3ac515d
Install scripts updates.
vladd-bit Nov 20, 2026
783bc55
K3s install script: enabled secret encryption by default.
vladd-bit Nov 20, 2026
3046838
Install script update.
vladd-bit Nov 20, 2026
d9fb587
Merge branch 'main' of https://github.com/CogStack/cogstack-platform …
vladd-bit Nov 20, 2026
349a71f
Rename jupyterhub to jupyter-hub , /deployment/charts
vladd-bit Nov 20, 2026
a127cd3
Updated install scripts.
vladd-bit Nov 20, 2026
a025ff3
Added makefile for util installation [bare metal].
vladd-bit Nov 20, 2026
3635cd4
Installation scripts: cleaned up util install + added railguard for d…
vladd-bit Nov 20, 2026
4f08481
Added remote server install util script.
vladd-bit Nov 20, 2026
583b15a
Added makefile cmds for remote k3s install & cluster subscription.
vladd-bit Nov 20, 2026
1d730dc
QoL improvements to scripts.
vladd-bit Nov 21, 2026
b1a3793
Added nginx/apps.
vladd-bit Nov 21, 2026
77cc8e6
Nginx: changed timeouts etc.
vladd-bit Nov 21, 2026
6fa67df
Converted observability to use nginx.
vladd-bit Nov 21, 2026
a5c804d
Merge branch 'main' into chore_adaptations_to_kube
vladd-bit Nov 21, 2026
2a64cbc
Merge branch 'main' of https://github.com/CogStack/cogstack-platform …
vladd-bit Nov 21, 2026
ecad33a
Updated image push pathways.
vladd-bit Nov 21, 2026
e7b217d
Merge branch 'chore_adaptations_to_kube' of https://github.com/CogSta…
vladd-bit Nov 21, 2026
a5e8db3
Merge branch 'main' into chore_adaptations_to_kube
vladd-bit Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/docker_build_cohorter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- name: nl2dsl
context: apps/cohorter/NL2DSL
dockerfile: apps/cohorter/NL2DSL/Dockerfile
image: cogstacksystems/cogstack-cohorter-nl2dsl
image: cogstacksystems/cohorter-nl2dsl

- name: webapp
context: apps/cohorter/WebAPP
dockerfile: apps/cohorter/WebAPP/Dockerfile
image: cogstacksystems/cogstack-cohorter-webapp
image: cogstacksystems/cohorter-webapp

steps:
- name: Checkout branch
Expand All @@ -43,6 +43,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

Expand All @@ -67,6 +70,7 @@ jobs:
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/docker_build_nginx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: docker_build_nginx

on:
push:
branches: [main]
tags: ["v*.*.*"]
paths:
- "apps/nginx/**"
- ".github/workflows/docker_build_nginx.yml"
pull_request:
paths:
- "apps/nginx/**"
- ".github/workflows/docker_build_nginx.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
docker:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.repository == 'CogStack/cogstack-platform'
steps:
- uses: actions/checkout@v7
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4

- uses: docker/login-action@v4
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: docker/metadata-action@v6
id: meta
with:
images: cogstacksystems/nginx
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha

- uses: docker/build-push-action@v7
with:
context: apps/nginx
file: apps/nginx/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=cogstack-nginx
cache-to: type=gha,scope=cogstack-nginx,mode=max
34 changes: 11 additions & 23 deletions .github/workflows/docker_build_observability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
- "v*.*.*" # e.g., v0.1.1
paths:
- "apps/observability/**"
- "apps/nginx/**"
- "deployment/examples/observability/**"
- ".github/workflows/docker_build_observability.yml"
pull_request:
paths:
- "apps/observability/**"
- "apps/nginx/**"
- "deployment/examples/observability/**"
- ".github/workflows/docker_build_observability.yml"

Expand All @@ -37,10 +39,6 @@ jobs:
context: apps/observability/grafana
dockerfile: apps/observability/grafana/Dockerfile
image: cogstacksystems/cogstack-observability-grafana
- name: traefik
context: apps/observability/traefik
dockerfile: apps/observability/traefik/Dockerfile
image: cogstacksystems/cogstack-observability-traefik
- name: alloy
context: apps/observability/grafana-alloy
dockerfile: apps/observability/grafana-alloy/Dockerfile
Expand Down Expand Up @@ -93,6 +91,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v7

- name: Build NGINX for integration tests
run: docker build -t cogstacksystems/nginx:test apps/nginx

- name: Set up Python
uses: actions/setup-python@v7
with:
Expand All @@ -102,32 +103,19 @@ jobs:
- name: Install Python dependencies
run: pip install -r deployment/examples/observability/test/requirements.txt

- name: Run Simple quickstart test
- name: Run quickstart tests
run: |
echo "🧪 Running Simple quickstart test..."
echo "🧪 Running quickstart tests..."
IMAGE_TAG="sha-${GITHUB_SHA::7}"
echo "Using images tagged ${IMAGE_TAG}"
export OBSERVABILITY_BASE_URL="file://${GITHUB_WORKSPACE}/deployment/examples/observability"
export COMPOSE_FILE="${GITHUB_WORKSPACE}/deployment/examples/observability/simple/observability-simple/docker-compose.yml:${RUNNER_TEMP}/observability-images.yml"
export COMPOSE_FILE="docker-compose.yml:${RUNNER_TEMP}/observability-images.yml"
{
echo "services:"
for service in alloy prometheus grafana traefik; do
for service in alloy prometheus grafana; do
printf ' %s:\n image: cogstacksystems/cogstack-observability-%s:%s\n' \
"$service" "$service" "$IMAGE_TAG"
done
printf ' nginx:\n image: cogstacksystems/nginx:test\n'
} > "${RUNNER_TEMP}/observability-images.yml"
if ! bash deployment/examples/observability/test/test-quickstart.sh; then
docker compose ps --all || true
docker compose logs --no-color --tail=100 || true
exit 1
fi

- name: Report test result
if: always()
run: |
if [ $? -eq 0 ]; then
echo "✅ quickstart test PASSED"
else
echo "❌ quickstart test FAILED"
exit 1
fi
bash deployment/examples/observability/test/test-quickstart.sh
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_ocr_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'ocr-service-v')
uses: ./.github/workflows/docker_template_ocr_service.yml
with:
image: cogstacksystems/cogstack-ocr-service
image: cogstacksystems/ocr-service
context: apps/ocr-service
dockerfile: apps/ocr-service/Dockerfile
cache_scope: cogstack-ocr-service
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"deployment/charts/ce": "0.7.1",
"deployment/charts/cohorter": "0.5.0",
"deployment/charts/observability": "0.4.1",
"deployment/charts/jupyterhub": "0.5.0",
"deployment/charts/jupyter-hub": "0.5.0",
"deployment/charts/ocr-service": "0.1.0",
"deployment/charts/nifi": "0.0.0",
"deployment/charts/nginx": "0.0.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/nginx/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**
!Dockerfile
!LICENSE
!nginx.conf
!profiles/
!profiles/**
38 changes: 38 additions & 0 deletions apps/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM nginx:1.31.9@sha256:84f7876d21d154885f99554d7ae325d8c2213f9169726ea7ab60642f2573a787

ARG NGINX_UID=1000
ARG NGINX_GID=1000

COPY nginx.conf /etc/nginx/nginx.conf
COPY profiles/ /etc/nginx/templates/
COPY LICENSE /usr/share/doc/cogstack-nginx/LICENSE

ENV HOME=/tmp \

Check warning on line 10 in apps/nginx/Dockerfile

View workflow job for this annotation

GitHub Actions / docker

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "NGINX_TLS_CERTIFICATE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/templates/nifi \
NGINX_ENVSUBST_OUTPUT_DIR=/tmp \
NGINX_ENVSUBST_FILTER="^(NGINX_|NIFI_|MEDCAT_)" \
NGINX_ENTRYPOINT_LOCAL_RESOLVERS=1 \
NGINX_HEALTH_PORT=8080 \
NIFI_UPSTREAM_HOST=nifi \
NIFI_UPSTREAM_PORT=8443 \
NIFI_UPSTREAM_TLS_NAME=nifi \
NIFI_INTERNAL_PORT_NGINX=8443 \
NIFI_WEB_PROXY_PORT=8443 \
NGINX_NIFI_SERVER_NAME=_ \
NGINX_PROXY_CONTEXT_PATH="" \
NGINX_PROXY_SCHEME=https \
NGINX_TLS_CERTIFICATE=/certificates/nifi/nifi.pem \
NGINX_TLS_CERTIFICATE_KEY=/certificates/nifi/nifi.key \
NGINX_UPSTREAM_CA=/certificates/root/root-ca.pem \
MEDCAT_LISTEN_PORT=8001 \
MEDCAT_SERVER_NAME=_ \
MEDCAT_UPSTREAM_HOST=127.0.0.1 \
MEDCAT_UPSTREAM_PORT=8000 \
MEDCAT_SOLR_HOST=solr \
MEDCAT_SOLR_PORT=8983 \
MEDCAT_STATIC_ROOT=/home/api/static \
MEDCAT_MEDIA_ROOT=/home/api/media

USER ${NGINX_UID}:${NGINX_GID}
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD ["sh", "-c", "exec curl -fsS --noproxy '*' --max-time 5 -o /dev/null \"http://127.0.0.1:${NGINX_HEALTH_PORT}/healthz/ready\""]
94 changes: 94 additions & 0 deletions apps/nginx/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# Elastic License 2.0

URL: <https://www.elastic.co/licensing/elastic-license>

## Acceptance

By using the software, you agree to all of the terms and conditions below.

## Copyright License

The licensor grants you a non-exclusive, royalty-free, worldwide,
non-sublicensable, non-transferable license to use, copy, distribute, make
available, and prepare derivative works of the software, in each case subject to
the limitations and conditions below.

## Limitations

You may not provide the software to third parties as a hosted or managed
service, where the service provides users with access to any substantial set of
the features or functionality of the software.

You may not move, change, disable, or circumvent the license key functionality
in the software, and you may not remove or obscure any functionality in the
software that is protected by the license key.

You may not alter, remove, or obscure any licensing, copyright, or other notices
of the licensor in the software. Any use of the licensor’s trademarks is subject
to applicable law.

## Patents

The licensor grants you a license, under any patent claims the licensor can
license, or becomes able to license, to make, have made, use, sell, offer for
sale, import and have imported the software, in each case subject to the
limitations and conditions in this license. This license does not cover any
patent claims that you cause to be infringed by modifications or additions to
the software. If you or your company make any written claim that the software
infringes or contributes to infringement of any patent, your patent license for
the software granted under these terms ends immediately. If your company makes
such a claim, your patent license ends immediately for work on behalf of your
company.

## Notices

You must ensure that anyone who gets a copy of any part of the software from you
also gets a copy of these terms.

If you modify the software, you must include in any modified copies of the
software prominent notices stating that you have modified the software.

## No Other Rights

These terms do not imply any licenses other than those expressly granted in
these terms.

## Termination

If you use the software in violation of these terms, such use is not licensed,
and your licenses will automatically terminate. If the licensor provides you
with a notice of your violation, and you cease all violation of this license no
later than 30 days after you receive that notice, your licenses will be
reinstated retroactively. However, if you violate these terms after such
reinstatement, any additional violation of these terms will cause your licenses
to terminate automatically and permanently.

## No Liability

*As far as the law allows, the software comes as is, without any warranty or
condition, and the licensor will not be liable to you for any damages arising
out of these terms or the use or nature of the software, under any kind of
legal claim.*

## Definitions

The **licensor** is the entity offering these terms, and the **software** is the
software the licensor makes available under these terms, including any portion
of it.

**you** refers to the individual or entity agreeing to these terms.

**your company** is any legal entity, sole proprietorship, or other kind of
organization that you work for, plus all organizations that have control over,
are under the control of, or are under common control with that
organization. **control** means ownership of substantially all the assets of an
entity, or the power to direct its management and policies by vote, contract, or
otherwise. Control can be direct or indirect.

**your licenses** are all the licenses granted to you for the software under
these terms.

**use** means anything you do with the software requiring one of your licenses.

**trademark** means trademarks, service marks, and similar rights.
67 changes: 67 additions & 0 deletions apps/nginx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# CogStack NGINX

One image with NiFi, MedCAT-trainer and observability configurations, selected per container.
It uses the upstream image's entrypoint, environment substitution and DNS
resolver discovery. There is no custom entrypoint or configuration framework.

Adapted from [CogStack/CogStack-NiFi services/nginx](https://github.com/CogStack/CogStack-NiFi/tree/71b3d483747a504986205addb4d2b17f58f19a0b/services/nginx)
at `71b3d483747a504986205addb4d2b17f58f19a0b`. NiFi routes are retained;
startup uses NGINX's existing implementation and the health check invokes curl.
Trainer routes come from the existing MedCAT-trainer Helm chart. These are
modified copies; see `LICENSE`.

Build from the repository root:

```bash
docker build -t cogstacksystems/nginx:local apps/nginx
```

The image is published independently by [docker_build_nginx.yml](../../.github/workflows/docker_build_nginx.yml)
as `cogstacksystems/nginx` for `linux/amd64` and `linux/arm64`.

Select the configuration with the upstream image's variable:

| Application | `NGINX_ENVSUBST_TEMPLATE_DIR` |
| --- | --- |
| NiFi (default) | `/etc/nginx/templates/nifi` |
| MedCAT-trainer | `/etc/nginx/templates/medcat-trainer` |
| Observability | `/etc/nginx/templates/observability` |

All environment defaults are declared in `Dockerfile`. Treat template values
as trusted deployment configuration. The substitution filter preserves NGINX
variables such as `$host`.

For NiFi, mount the frontend certificate/key at `/certificates/nifi/nifi.pem`
and `/certificates/nifi/nifi.key`, and the upstream CA at
`/certificates/root/root-ca.pem`. Set `NIFI_UPSTREAM_HOST`,
`NIFI_UPSTREAM_PORT`, `NIFI_UPSTREAM_TLS_NAME` and `NIFI_WEB_PROXY_PORT` for
the deployment. TLS verification stays enabled. An optional
`NGINX_PROXY_CONTEXT_PATH` must start with `/` and have no trailing slash.

For MedCAT-trainer, mount static/media directories at `/home/api/static` and
`/home/api/media`. Set `MEDCAT_UPSTREAM_HOST` and `MEDCAT_SOLR_HOST` to the
backend service names. Defaults use ports 8000 and 8983, with NGINX listening
on 8001. In a trainer Pod, the backend host can remain `127.0.0.1`. The
configuration preserves Solr path rewriting, gzip, the `4000m` upload limit
and `3000s` read/send timeouts for model loading and transfers. Connections
use NGINX's default `60s` timeout; idle client keepalive uses `65s`.
TLS terminates at the deployment's external gateway.

For observability, NGINX listens on 8001 and routes `/grafana/`, `/prometheus/`
and `/alloy/` to their Compose services. `/blackbox-exporter/` is available when
a standalone `blackbox-exporter` service is deployed. Grafana and blackbox
prefixes are stripped; Prometheus and Alloy prefixes are preserved.

Access logs include request time (`rt`), upstream response time (`urt`) and
upstream status (`us`).

The image runs as UID/GID `1000:1000`; build arguments `NGINX_UID` and
`NGINX_GID` can change them. Mount readable certificates and files. A read-only
root filesystem works with writable `/tmp`; size temporary storage for the
deployment's buffered uploads and responses.

Health endpoints listen on loopback port 8080 (`NGINX_HEALTH_PORT`).
`/healthz/live` checks NGINX alone; `/healthz/ready` checks the application
backend. Docker's health check uses readiness; Kubernetes exec probes can
call curl directly. The health port must differ from the application port.
Existing chart image defaults are unchanged.
Loading
Loading