mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 21:54:00 +02:00
working on making things work with docker
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM ghcr.io/astral-sh/uv:debian-slim
|
||||
ARG VERSION
|
||||
LABEL version=${VERSION}
|
||||
LABEL description="Docker image for the backend of MediaManager"
|
||||
WORKDIR /app
|
||||
COPY media_manager ./media_manager
|
||||
COPY alembic ./alembic
|
||||
COPY alembic.ini .
|
||||
COPY pyproject.toml .
|
||||
COPY uv.lock .
|
||||
RUN uv sync --locked
|
||||
EXPOSE 8000
|
||||
CMD ["uv", "run", "fastapi", "run", "/app/media_manager/main.py"]
|
||||
@@ -86,14 +86,18 @@ if basic_config.DEVELOPMENT:
|
||||
origins = [
|
||||
"*",
|
||||
]
|
||||
else:
|
||||
origins = [
|
||||
basic_config.FRONTEND_URL,
|
||||
]
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Standard Auth Routers
|
||||
app.include_router(
|
||||
|
||||
@@ -25,4 +25,5 @@ dependencies = [
|
||||
"tvdb-v4-official>=1.1.0",
|
||||
"typing-inspect>=0.9.0",
|
||||
"uvicorn>=0.34.2",
|
||||
"fastapi-utils>=0.8.0",
|
||||
]
|
||||
|
||||
16
uv.lock
generated
16
uv.lock
generated
@@ -361,6 +361,20 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a6/08/9968963c1fb8c34627b7f1fbcdfe9438540f87dc7c9bfb59bb4fd19a4ecf/fastapi_users_db_sqlalchemy-7.0.0-py3-none-any.whl", hash = "sha256:5fceac018e7cfa69efc70834dd3035b3de7988eb4274154a0dbe8b14f5aa001e", size = 6891, upload-time = "2025-01-04T13:09:02.869Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastapi-utils"
|
||||
version = "0.8.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "fastapi" },
|
||||
{ name = "psutil" },
|
||||
{ name = "pydantic" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/dd/af/57c949675176acf389d94fbccd369b486579a952637fc6fb104f1bc3d0c3/fastapi_utils-0.8.0.tar.gz", hash = "sha256:eca834e80c09f85df30004fe5e861981262b296f60c93d5a1a1416fe4c784140", size = 16496, upload-time = "2024-11-11T08:30:03.852Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/43/8b/cef8cfed7ed77d52fc772b1c7b966ba019a3f50b65a2b3625a0f3b7f6f53/fastapi_utils-0.8.0-py3-none-any.whl", hash = "sha256:6c4d507a76bab9a016cee0c4fa3a4638c636b2b2689e39c62254b1b2e4e81825", size = 18495, upload-time = "2024-11-11T08:30:01.914Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "greenlet"
|
||||
version = "3.2.2"
|
||||
@@ -566,6 +580,7 @@ dependencies = [
|
||||
{ name = "fastapi", extra = ["standard"] },
|
||||
{ name = "fastapi-restful", extra = ["all"] },
|
||||
{ name = "fastapi-users", extra = ["sqlalchemy"] },
|
||||
{ name = "fastapi-utils" },
|
||||
{ name = "httpx" },
|
||||
{ name = "httpx-oauth" },
|
||||
{ name = "jsonschema" },
|
||||
@@ -591,6 +606,7 @@ requires-dist = [
|
||||
{ name = "fastapi", extras = ["standard"], specifier = ">=0.115.12" },
|
||||
{ name = "fastapi-restful", extras = ["all"], specifier = ">=0.6.0" },
|
||||
{ name = "fastapi-users", extras = ["sqlalchemy"], specifier = ">=14.0.1" },
|
||||
{ name = "fastapi-utils", specifier = ">=0.8.0" },
|
||||
{ name = "httpx", specifier = ">=0.28.1" },
|
||||
{ name = "httpx-oauth", specifier = ">=0.16.1" },
|
||||
{ name = "jsonschema", specifier = ">=4.24.0" },
|
||||
|
||||
10
web/src/routes/+layout.server.ts
Normal file
10
web/src/routes/+layout.server.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {env} from '$env/dynamic/public';
|
||||
|
||||
let ssrMode = false
|
||||
if (env.PUBLIC_WEB_SSR == undefined) {
|
||||
ssrMode = false;
|
||||
} else {
|
||||
ssrMode = env.PUBLIC_WEB_SSR.toLowerCase() == 'true';
|
||||
}
|
||||
console.log('SSR Mode:', ssrMode);
|
||||
export const ssr = ssrMode;
|
||||
@@ -1,3 +0,0 @@
|
||||
import {env} from '$env/dynamic/public';
|
||||
|
||||
export const ssr = (env.PUBLIC_WEB_SSR.toLowerCase() == 'true');
|
||||
Reference in New Issue
Block a user