Fixed api docs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Administrator 2023-03-21 00:18:27 +01:00
parent 5a98038dcf
commit 1df240c845
2 changed files with 3 additions and 9 deletions

View File

@ -10,9 +10,7 @@ from config import Settings
app = FastAPI(title="Translator",
description="DHBW Cloud Computing II",
version="1.0.0",
docs_url='/api/docs',
redoc_url='/api/redoc',
openapi_url='/api/openapi.json')
root_path='/api')
@app.on_event("startup")
async def start_database():

View File

@ -1,4 +1,3 @@
# HTTPS server configuration
server {
listen 443 ssl;
server_name translator.dhbw.flokaiser.com;
@ -8,7 +7,6 @@ server {
ssl_trusted_certificate /etc/letsencrypt/live/test-name/chain.pem;
location / {
# Forward requests to port 80
proxy_pass http://frontend:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@ -16,8 +14,7 @@ server {
proxy_set_header X-Forwarded-Proto https;
}
location /api {
# Forward requests to port 80
location /api/ {
proxy_pass http://backend:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@ -26,10 +23,9 @@ server {
}
}
# HTTP server configuration
server {
listen 80;
server_name translator.dhbw.flokaiser.com;
return 301 https://$server_name$request_uri;
}
}