Skip to content

Commit

Permalink
feat: add Docker configurations for development and production
Browse files Browse the repository at this point in the history
  • Loading branch information
c0deplayer committed Oct 29, 2024
1 parent 8f9311f commit 466e688
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile.ocr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.12
LABEL authors="codeplayer"

WORKDIR /code
COPY ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY ./src/documentclassification/ocr/ /code/documentclassification/ocr/

CMD ["fastapi", "run", "documentclassification/ocr/ocr.py", "--port", "8080"]
11 changes: 11 additions & 0 deletions Dockerfile.processor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.12
LABEL authors="codeplayer"

WORKDIR /code
COPY ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY ./src/documentclassification/process/ /code/documentclassification/process/

CMD ["fastapi", "run", "documentclassification/process/process.py", "--port", "9090"]
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
services:
ocr:
container_name: ocr_service
build:
dockerfile: Dockerfile.ocr
ports:
- "8080:8080"

processor:
container_name: processor_service
build:
dockerfile: Dockerfile.processor
ports:
- "9090:9090"
depends_on:
- ocr

0 comments on commit 466e688

Please sign in to comment.