mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix: docker backend entrpoint issues
This commit is contained in:
parent
1ea99bc8f6
commit
133e2639ec
3 changed files with 2 additions and 4 deletions
|
|
@ -39,7 +39,6 @@ services:
|
||||||
- "${BACKEND_PORT:-8000}:8000"
|
- "${BACKEND_PORT:-8000}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./surfsense_backend/app:/app/app
|
- ./surfsense_backend/app:/app/app
|
||||||
- ./surfsense_backend/scripts:/app/scripts:ro
|
|
||||||
- shared_temp:/tmp
|
- shared_temp:/tmp
|
||||||
env_file:
|
env_file:
|
||||||
- ./surfsense_backend/.env
|
- ./surfsense_backend/.env
|
||||||
|
|
|
||||||
|
|
@ -72,5 +72,5 @@ ENV PYTHONPATH=/app
|
||||||
ENV UVICORN_LOOP=asyncio
|
ENV UVICORN_LOOP=asyncio
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
EXPOSE 8000
|
EXPOSE 8000-8001
|
||||||
CMD ["/app/scripts/docker/entrypoint.sh"]
|
CMD ["/app/scripts/docker/entrypoint.sh"]
|
||||||
|
|
@ -9,7 +9,6 @@ from fastapi_users.authentication import (
|
||||||
JWTStrategy,
|
JWTStrategy,
|
||||||
)
|
)
|
||||||
from fastapi_users.db import SQLAlchemyUserDatabase
|
from fastapi_users.db import SQLAlchemyUserDatabase
|
||||||
from fastapi_users.schemas import model_dump
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from app.config import config
|
from app.config import config
|
||||||
|
|
@ -86,7 +85,7 @@ class CustomBearerTransport(BearerTransport):
|
||||||
if config.AUTH_TYPE == "GOOGLE":
|
if config.AUTH_TYPE == "GOOGLE":
|
||||||
return RedirectResponse(redirect_url, status_code=302)
|
return RedirectResponse(redirect_url, status_code=302)
|
||||||
else:
|
else:
|
||||||
return JSONResponse(model_dump(bearer_response))
|
return JSONResponse(bearer_response.model_dump())
|
||||||
|
|
||||||
|
|
||||||
bearer_transport = CustomBearerTransport(tokenUrl="auth/jwt/login")
|
bearer_transport = CustomBearerTransport(tokenUrl="auth/jwt/login")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue