Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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)
13 changes: 13 additions & 0 deletions docker-compose.yml
Comment thread
MingJ7 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ services:
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
- 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.

redis:
container_name: redis
image: redis:7.4.4-alpine
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.
16 changes: 16 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,16 @@
server {
listen 80;
server_name localhost;

location /processor/ {
proxy_pass ${PDF_PROCESSOR_URL};
}
Comment thread
MingJ7 marked this conversation as resolved.
Outdated

location /extractor/ {
proxy_pass ${PDF_EXTRACTOR_URL};
}
Comment thread
MingJ7 marked this conversation as resolved.
Outdated

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