diff --git a/.github/workflows/_docker_template.yml b/.github/workflows/_docker_template.yml index 5c2a9ac..17164f6 100644 --- a/.github/workflows/_docker_template.yml +++ b/.github/workflows/_docker_template.yml @@ -1,4 +1,4 @@ -name: Docker Multi-Arch Template +name: docker-multi-arch-template permissions: contents: read @@ -43,9 +43,9 @@ jobs: platform: [amd64, arm64] include: - platform: amd64 - runner: ubuntu-22.04 + runner: ubuntu-24.04 - platform: arm64 - runner: ubuntu-22.04-arm + runner: ubuntu-24.04-arm steps: - uses: actions/checkout@v6 @@ -101,7 +101,7 @@ jobs: # CREATE MULTI-ARCH MANIFESTS # --------------------------------------------------------- manifest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.event_name != 'pull_request' needs: build diff --git a/.github/workflows/docker_smoke.yml b/.github/workflows/docker_smoke.yml index ccc8d4f..f88b1b4 100644 --- a/.github/workflows/docker_smoke.yml +++ b/.github/workflows/docker_smoke.yml @@ -1,9 +1,10 @@ name: docker-smoke-ocr-service on: - pull_request: push: - branches: [ main ] + branches: [ "*" ] + pull_request: + branches: [ "*" ] workflow_dispatch: jobs: @@ -17,27 +18,24 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build image (dev) - run: | - docker build -t ocr-service:smoke -f Dockerfile . - - name: Start stack run: | cd docker - docker compose -f docker-compose.base.yml -f docker-compose.dev.yml up -d + make start-dev-build + env: - OCR_SERVICE_EXTERNAL_PORT: 18090 - OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 18091 + OCR_SERVICE_EXTERNAL_PORT: 8090 + OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 8091 - name: Wait for health env: - OCR_SERVICE_EXTERNAL_PORT: 18090 - OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 18091 + OCR_SERVICE_EXTERNAL_PORT: 8090 + OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 8091 run: | set -euo pipefail timeout=600 - interval=5 - url="http://localhost:${OCR_SERVICE_EXTERNAL_PORT:-18090}/api/health" + interval=10 + url="http://localhost:${OCR_SERVICE_EXTERNAL_PORT:-8090}/api/health" end=$((SECONDS+timeout)) while [ $SECONDS -lt $end ]; do @@ -52,15 +50,15 @@ jobs: - name: Check info env: - OCR_SERVICE_EXTERNAL_PORT: 18090 + OCR_SERVICE_EXTERNAL_PORT: 8090 run: | - curl -fsS "http://localhost:${OCR_SERVICE_EXTERNAL_PORT:-18090}/api/info" + curl -fsS "http://localhost:${OCR_SERVICE_EXTERNAL_PORT:-8090}/api/info" - name: Check health (text-only port) env: - OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 18091 + OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT: 8091 run: | - curl -fsS "http://localhost:${OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT:-18091}/api/health" + curl -fsS "http://localhost:${OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT:-8091}/api/health" - name: Logs on failure if: failure() diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 837f783..29f8d77 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -4,6 +4,8 @@ services: file: docker-compose.base.yml service: ocr-service container_name: ocr-service-dev + ports: + - "${OCR_SERVICE_EXTERNAL_PORT:-8090}:${OCR_SERVICE_INTERNAL_PORT:-8090}" build: context: ../ dockerfile: "Dockerfile" @@ -13,6 +15,8 @@ services: file: docker-compose.base.yml service: ocr-service-text-only container_name: ocr-service-text-only-dev + ports: + - "${OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT:-8091}:${OCR_SERVICE_INTERNAL_PORT:-8090}" build: context: ../ dockerfile: "Dockerfile" diff --git a/env/ocr_service.env b/env/ocr_service.env index f58a1fa..b97b664 100644 --- a/env/ocr_service.env +++ b/env/ocr_service.env @@ -63,7 +63,6 @@ OCR_SERVICE_GUNICORN_GRACEFUL_TIMEOUT=30 # External/internal port mapping (used in docker-compose) OCR_SERVICE_EXTERNAL_PORT=8090 OCR_SERVICE_INTERNAL_PORT=8090 -OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT=8091 # OCR_WEB_SERVICE_WORKER_CLASS - possible values: ["gthread", "sync"], "gthread" is best if you use multiple # threads per worker, if you are only using 1 worker and 1 thread, max performance is achieved diff --git a/env/ocr_service_text_only.env b/env/ocr_service_text_only.env index b4d30c9..f3e10a4 100644 --- a/env/ocr_service_text_only.env +++ b/env/ocr_service_text_only.env @@ -4,7 +4,8 @@ OCR_SERVICE_OPERATION_MODE=NO_OCR # optional: change port if running alongside the OCR service -OCR_SERVICE_EXTERNAL_PORT=8091 +OCR_SERVICE_TEXT_ONLY_EXTERNAL_PORT=8091 + # keep internal port unless you change the service binding OCR_SERVICE_INTERNAL_PORT=8090