From 76642e83515c0200f844fefb23a64648bd1bcf36 Mon Sep 17 00:00:00 2001 From: Jannik Kramer Date: Tue, 27 Jan 2026 11:44:26 +0100 Subject: [PATCH] moves journex deployment from sub repo to GHCR --- .../journex/compose.yaml | 51 +++++++++++++++++++ .../reverse-proxy/sites/oauthed.caddy | 27 ++++++---- .../hetzner/host_vars/cit-docker-host.yaml | 4 +- ...y-cf-journex.yml => 06-deploy-journex.yml} | 20 ++++---- 4 files changed, 81 insertions(+), 21 deletions(-) create mode 100644 docker_compose_applications/journex/compose.yaml rename playbooks/{06-deploy-cf-journex.yml => 06-deploy-journex.yml} (52%) diff --git a/docker_compose_applications/journex/compose.yaml b/docker_compose_applications/journex/compose.yaml new file mode 100644 index 0000000..ba54d1c --- /dev/null +++ b/docker_compose_applications/journex/compose.yaml @@ -0,0 +1,51 @@ +services: + frontend: + container_name: journex-frontend + image: ghcr.io/consider-it/journex-frontend:latest + restart: unless-stopped + networks: + - journex_net + - caddy_net + + backend: + container_name: journex-backend + image: ghcr.io/consider-it/journex-backend:latest + restart: unless-stopped + env_file: + - .env + networks: + - journex_net + - caddy_net + + pdf-fusion-extractor: + container_name: journex-pdf-fusion-extractor + image: ghcr.io/consider-it/journex-pdf-fusion-extractor:latest + restart: unless-stopped + volumes: + - /ansible_docker_compose/project_data/journex/pdf-fusion-extractor/output:/app/output + - /ansible_docker_compose/project_data/journex/pdf-fusion-extractor/data:/app/data:ro + environment: + PDF_FUSION_CONFIG: /app/config/config.yaml + networks: + - journex_net + extra_hosts: + - "ollama:10.20.1.2" + - "host.docker.internal:10.20.1.2" + + pdf-bounding-boxes: + container_name: journex-pdf-bounding-boxes + image: ghcr.io/consider-it/journex-pdf-bounding-boxes:latest + restart: unless-stopped + volumes: + - /ansible_docker_compose/project_data/journex/pdf-bounding-boxes/bounding_boxes:/app/bounding_boxes + environment: + BOUNDING_BOX_DIR: /app/bounding_boxes + networks: + - journex_net + +networks: + journex_net: + name: journex_net + driver: bridge + caddy_net: + external: true diff --git a/docker_compose_applications/reverse-proxy/sites/oauthed.caddy b/docker_compose_applications/reverse-proxy/sites/oauthed.caddy index a67ca2c..0dbdda0 100644 --- a/docker_compose_applications/reverse-proxy/sites/oauthed.caddy +++ b/docker_compose_applications/reverse-proxy/sites/oauthed.caddy @@ -20,6 +20,13 @@ } registry.cortex.consider-funding.de { + handle /health { + reverse_proxy https://ai-registry.neukiefer.de { + header_up Host ai-registry.neukiefer.de + header_up Authorization {env.REGISTRY_DOWNSTREAM_AUTH} + } + } + import oauth2 registry.cortex.consider-funding.de { reverse_proxy https://ai-registry.neukiefer.de { header_up Host ai-registry.neukiefer.de @@ -36,15 +43,22 @@ pdf.consider-it.de { pseudo.cortex.consider-funding.de { handle /health { - reverse_proxy http://transcript-pseudomizer-frontend:5000 + reverse_proxy http://cf-pseudomizer-frontend:5000 } import oauth2 pseudo.cortex.consider-funding.de { - reverse_proxy http://transcript-pseudomizer-frontend:5000 + reverse_proxy http://cf-pseudomizer-frontend:5000 } } enricher.cortex.consider-funding.de { + handle /health { + reverse_proxy https://ai-enricher.neukiefer.de { + header_up Host ai-enricher.neukiefer.de + header_up Authorization {env.ENRICHER_DOWNSTREAM_AUTH} + } + } + import oauth2 enricher.cortex.consider-funding.de { reverse_proxy https://ai-enricher.neukiefer.de { header_up Host ai-enricher.neukiefer.de @@ -57,10 +71,7 @@ enricher.cortex.consider-funding.de { journex.cortex.consider-funding.de { import oauth2 journex.cortex.consider-funding.de { route { - @apiExact path /api - redir @apiExact /api/ - - handle_path /api/* { + handle /api/* { reverse_proxy journex-backend:7000 } @@ -68,9 +79,7 @@ journex.cortex.consider-funding.de { reverse_proxy journex-backend:7000 } - root * /srv/journex - try_files {path} /index.html - file_server + reverse_proxy journex-frontend:7500 } } } diff --git a/inventories/hetzner/host_vars/cit-docker-host.yaml b/inventories/hetzner/host_vars/cit-docker-host.yaml index d8ca237..eb7436c 100644 --- a/inventories/hetzner/host_vars/cit-docker-host.yaml +++ b/inventories/hetzner/host_vars/cit-docker-host.yaml @@ -7,7 +7,7 @@ docker_compose__projects: files_directory: ../docker_compose_applications/n8n - name: oauth2-proxy files_directory: ../docker_compose_applications/oauth2-proxy - - name: cf-journex - files_directory: ../docker_compose_applications/cf-journex + - name: journex + files_directory: ../docker_compose_applications/journex - name: pseudomizer files_directory: ../docker_compose_applications/pseudomizer diff --git a/playbooks/06-deploy-cf-journex.yml b/playbooks/06-deploy-journex.yml similarity index 52% rename from playbooks/06-deploy-cf-journex.yml rename to playbooks/06-deploy-journex.yml index f1788d2..e8f1889 100644 --- a/playbooks/06-deploy-cf-journex.yml +++ b/playbooks/06-deploy-journex.yml @@ -1,17 +1,17 @@ -- name: Deploy cf-journex only +- name: Deploy journex only hosts: cit-docker-host tasks: - - name: Run docker compose down for cf-journex + - name: Run docker compose down for journex ansible.builtin.command: - cmd: /usr/bin/docker compose --project-directory "/ansible_docker_compose/projects/cf-journex" --project-name "cf-journex" down - chdir: "/ansible_docker_compose/projects/cf-journex" + cmd: /usr/bin/docker compose --project-directory "/ansible_docker_compose/projects/journex" --project-name "journex" down + chdir: "/ansible_docker_compose/projects/journex" become: true changed_when: true - - name: Deploy cf-journex project files + - name: Deploy journex project files ansible.posix.synchronize: - src: "../docker_compose_applications/cf-journex/" - dest: "/ansible_docker_compose/projects/cf-journex/" + src: "../docker_compose_applications/journex/" + dest: "/ansible_docker_compose/projects/journex/" mode: push archive: false copy_links: false @@ -27,9 +27,9 @@ verify_host: true become: true - - name: Run docker compose up for cf-journex + - name: Run docker compose up for journex ansible.builtin.command: - cmd: /usr/bin/docker compose --project-directory "/ansible_docker_compose/projects/cf-journex" --project-name "cf-journex" up --detach --pull always --build --force-recreate - chdir: "/ansible_docker_compose/projects/cf-journex" + cmd: /usr/bin/docker compose --project-directory "/ansible_docker_compose/projects/journex" --project-name "journex" up --detach --pull always --build --force-recreate + chdir: "/ansible_docker_compose/projects/journex" become: true changed_when: true