Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 4 additions & 4 deletions .github/workflows/_docker_template.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Multi-Arch Template
name: docker-multi-arch-template

permissions:
contents: read
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/docker_smoke.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: docker-smoke-ocr-service

on:
pull_request:
push:
branches: [ main ]
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch:

jobs:
Expand All @@ -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
Expand All @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion env/ocr_service.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion env/ocr_service_text_only.env
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading