Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
2 changes: 1 addition & 1 deletion chat_service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s"
)

app = FastAPI()
app = FastAPI(root_path="/chat")

app.include_router(health.router)
app.include_router(chat.router)
23 changes: 15 additions & 8 deletions docker-compose.yml
Comment thread
MingJ7 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ services:
context: .
dockerfile: ./pdf_processor_service/Dockerfile
container_name: pdf_processor_service
ports:
- "8000:8000"
env_file:
- ./pdf_processor_service/.env

Expand All @@ -14,21 +12,30 @@ services:
context: .
dockerfile: ./chat_service/Dockerfile
container_name: chat_service
ports:
- "8001:8000"
env_file:
- ./chat_service/.env
Comment thread
MingJ7 marked this conversation as resolved.
pdf_extraction:

pdf_extraction_service:
build:
context: .
dockerfile: ./pdf_extraction_service/Dockerfile
container_name: pdf_extraction_service
ports:
- "8002:8000"
depends_on:
- minio

nginx_service:
build:
context: .
dockerfile: ./nginx_service/Dockerfile
ports:
- "80:80"
Comment thread
MingJ7 marked this conversation as resolved.
Outdated
env_file:
- ./nginx_service/.env
depends_on:
- pdf_extraction_service
- pdf_processor_service
- chat_service
Comment thread
MingJ7 marked this conversation as resolved.
Comment thread
MingJ7 marked this conversation as resolved.
Comment thread
MingJ7 marked this conversation as resolved.

embedder_service:
build:
context: .
Expand Down
3 changes: 3 additions & 0 deletions nginx_service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:stable
Comment thread
MingJ7 marked this conversation as resolved.
Outdated

COPY ./nginx_service/nginx.conf.template /etc/nginx/templates/default.conf.template
3 changes: 3 additions & 0 deletions nginx_service/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PDF_PROCESSOR_URL=http://pdf_processor_service:8000
PDF_EXTRACTOR_URL=http://pdf_extraction_service:8000
CHAT_URL=http://chat_service:8000
Comment thread
MingJ7 marked this conversation as resolved.
22 changes: 22 additions & 0 deletions nginx_service/nginx.conf.template
Comment thread
MingJ7 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server {
listen 80;
server_name localhost;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $host;

location /processor/ {
proxy_pass ${PDF_PROCESSOR_URL}/;
}

location /extractor/ {
proxy_pass ${PDF_EXTRACTOR_URL}/;
}

location /chat/ {
proxy_pass ${CHAT_URL}/;
}
Comment thread
MingJ7 marked this conversation as resolved.
}
Comment thread
MingJ7 marked this conversation as resolved.
2 changes: 1 addition & 1 deletion pdf_extraction_service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s"
)

app = FastAPI()
app = FastAPI(root_path="/extractor")

app.include_router(health.router)
app.include_router(extractor.router)
2 changes: 1 addition & 1 deletion pdf_processor_service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s"
)

app = FastAPI()
app = FastAPI(root_path="/processor")

app.include_router(health.router)
app.include_router(document.router)
Expand Down