Исправление работы с реверс прокси

This commit is contained in:
2025-12-22 12:24:34 +03:00
parent 1141cf5e66
commit 49d1681bcb
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
# DEFAULT_ADMIN_EMAIL = "admin@example.com" # DEFAULT_ADMIN_EMAIL = "admin@example.com"
# DEFAULT_ADMIN_PASSWORD = "password-is-generated-randomly-on-first-launch" # DEFAULT_ADMIN_PASSWORD = "password-is-generated-randomly-on-first-launch"
POSTGRES_HOST = "localhost" POSTGRES_HOST = "db"
POSTGRES_PORT = "5432" POSTGRES_PORT = "5432"
POSTGRES_USER = "postgres" POSTGRES_USER = "postgres"
POSTGRES_PASSWORD = "postgres" POSTGRES_PASSWORD = "postgres"
Vendored
+2
View File
@@ -1,3 +1,5 @@
.env
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]
+1 -1
View File
@@ -26,4 +26,4 @@ USER app
ENV PYTHONPATH=/code ENV PYTHONPATH=/code
CMD ["uvicorn", "library_service.main:app", "--host", "0.0.0.0", "--port", "8000"] CMD ["uvicorn", "library_service.main:app", "--host", "0.0.0.0", "--port", "8000", "--forwarded-allow-ips=\"*\""]
+1 -1
View File
@@ -23,7 +23,7 @@ services:
build: . build: .
container_name: api container_name: api
restart: unless-stopped restart: unless-stopped
command: bash -c "uvicorn library_service.main:app --host 0.0.0.0 --port 8000" command: bash -c "uvicorn library_service.main:app --host 0.0.0.0 --port 8000 --forwarded-allow-ips=\"*\""
logging: logging:
options: options:
max-size: "10m" max-size: "10m"