docs(fastapi): exposes fastapi docs on /docs
This commit is contained in:
parent
7dd95d5443
commit
e07ddf8669
3 changed files with 16 additions and 8 deletions
|
|
@ -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"]
|
||||
|
|
@ -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
|
||||
|
|
|
|||
18
nginx.conf
18
nginx.conf
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue