docs(fastapi): exposes fastapi docs on /docs

This commit is contained in:
sauravniraula 2025-07-23 17:36:58 +05:45
parent 7dd95d5443
commit e07ddf8669
No known key found for this signature in database
GPG key ID: 60FCC1B5A5E83326
3 changed files with 16 additions and 8 deletions

View file

@ -41,7 +41,7 @@ RUN chmod -R 777 /node_dependencies
COPY nginx.conf /etc/nginx/nginx.conf
# Expose the port
EXPOSE 80 3000 8000
EXPOSE 80
# Start the servers
CMD ["/bin/bash", "/app/docker-dev-start.sh"]

View file

@ -58,8 +58,6 @@ services:
dockerfile: Dockerfile.dev
ports:
- "5000:80"
- "3000:3000"
- "8000:8000"
volumes:
- .:/app
- ./app_data:/app_data
@ -90,8 +88,6 @@ services:
capabilities: [gpu]
ports:
- "5000:80"
- "3000:3000"
- "8000:8000"
volumes:
- .:/app
- ./app_data:/app_data

View file

@ -16,9 +16,9 @@ http {
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1; # Required for WebSocket
proxy_set_header Upgrade $http_upgrade; # WebSocket header
proxy_set_header Connection "upgrade"; # WebSocket header
proxy_http_version 1.1; # Required for WebSocket
proxy_set_header Upgrade $http_upgrade; # WebSocket header
proxy_set_header Connection "upgrade"; # WebSocket header
proxy_set_header Host $host;
proxy_read_timeout 30m;
proxy_connect_timeout 30m;
@ -41,5 +41,17 @@ http {
proxy_read_timeout 30m;
proxy_connect_timeout 30m;
}
location /docs {
proxy_pass http://localhost:8000/docs;
proxy_read_timeout 30m;
proxy_connect_timeout 30m;
}
location /openapi.json {
proxy_pass http://localhost:8000/openapi.json;
proxy_read_timeout 30m;
proxy_connect_timeout 30m;
}
}
}