add transcript-api + transcript-frontend

This commit is contained in:
johannesstahlhut
2025-11-28 11:04:35 +01:00
parent 662ea8f1ee
commit 272af441a6
10 changed files with 88 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
}
pseudo.cortex.consider-funding.de {
import oauth2_protect pseudo.cortex.consider-funding.de http://10.20.0.2:5000
import oauth2_protect pseudo.cortex.consider-funding.de http://transcript-anonymizer-frontend:5000
}
# transcript-prompter
@@ -34,7 +34,7 @@ p-8002.cortex.consider-funding.de {
# pseudomizer
p-8003.cortex.consider-funding.de {
reverse_proxy http://10.20.0.2:8003
reverse_proxy http://transcript-anonymizer:8003
}
pdf.consider-it.de {

View File

@@ -0,0 +1,21 @@
# API-Metadaten
APP_NAME=Transcript Anonymizer API
APP_VERSION=1.0.0
# Uploads und Limits
UPLOAD_FOLDER=uploads
MAX_FILE_SIZE=16777216
ALLOWED_EXTENSIONS=["docx","txt"]
# Pfad zur Konfigurationsdatei (für cf_persons/labels/excluded_words)
CONFIG_JSON_PATH=app/config/config.json
# Ausgabe-Verzeichnis für Reports/Tests
API_OUTPUT_DIR=output
# Logging
LOG_LEVEL=INFO
ACCESS_LOG_LEVEL=INFO
LOG_LEVEL=INFO # oder DEBUG/WARNING/ERROR
ACCESS_LOG_LEVEL=INFO # Level nur für Uvicorn-Access-Logs

View File

@@ -0,0 +1,11 @@
services:
transcript-anonymizer:
image: ghcr.io/consider-it/transcript-anonymizer-api:latest
restart: unless-stopped
env_file: .env
volumes:
- /ansible_docker_compose/project_data/transcript-anonymizer-api/uploads:/app/uploads
networks: [caddy_net]
networks:
caddy_net:
external: true

View File

@@ -0,0 +1,6 @@
# Example configuration for the transcript anonymizer frontend
FLASK_ENV=production
ANONYMIZER_API_URL=http://transcript-anonymizer:8003/api/v1/anonymize
ANONYMIZER_HEALTH_URL=http://transcript-anonymizer:8003/api/v1/health
# Optional: override if the frontend expects a different port
# PORT=5000

View File

@@ -0,0 +1,13 @@
services:
transcript-anonymizer-frontend:
image: ghcr.io/consider-it/transcript-anonymizer-frontend:latest
restart: unless-stopped
env_file: .env
environment:
ANONYMIZER_API_URL: http://transcript-anonymizer:8003/api/v1/anonymize
ANONYMIZER_HEALTH_URL: http://transcript-anonymizer:8003/api/v1/health
networks: [caddy_net]
networks:
caddy_net:
external: true

View File

@@ -0,0 +1,3 @@
# GHCR registry credentials (set ghcr_pat via Ansible Vault)
ghcr_username: "" # e.g. your GitHub username or org bot user
ghcr_pat: "{{ vault_ghcr_pat | default('') }}"

View File

@@ -9,3 +9,7 @@ docker_compose__projects:
files_directory: ../docker_compose_applications/oauth2-proxy
- name: metabase
files_directory: ../docker_compose_applications/metabase
- name: transcript-anonymizer-api
files_directory: ../docker_compose_applications/transcript-anonymizer-api
- name: transcript-anonymizer-frontend
files_directory: ../docker_compose_applications/transcript-anonymizer-frontend

View File

@@ -1,4 +1,14 @@
- name: Ensure deployment of Docker Compose applications
hosts: Docker_Compose_Hosts
pre_tasks:
- name: Login to GHCR (if credentials provided)
community.docker.docker_login:
registry_url: ghcr.io
username: "{{ ghcr_username }}"
password: "{{ ghcr_pat }}"
when:
- ghcr_username | default('') | length > 0
- ghcr_pat | default('') | length > 0
become: true
roles:
- docker_compose

View File

@@ -8,5 +8,15 @@
- name: Ensure deployment of Docker Compose applications
hosts: Docker_Compose_Hosts
pre_tasks:
- name: Login to GHCR (if credentials provided)
community.docker.docker_login:
registry_url: ghcr.io
username: "{{ ghcr_username }}"
password: "{{ ghcr_pat }}"
when:
- ghcr_username | default('') | length > 0
- ghcr_pat | default('') | length > 0
become: true
roles:
- docker_compose

View File

@@ -1,3 +1,8 @@
- name: docker_compose
src: https://github.com/consider-it/ansible-role-docker_compose
version: main
---
roles:
- name: docker_compose
src: https://github.com/consider-it/ansible-role-docker_compose
version: main
collections:
- name: community.docker