Fix Docker installation startup

This commit is contained in:
faligam
2026-09-06 13:01:01 +02:00
parent 8a918c9d86
commit ac905e7198
4 changed files with 12 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
# Build context
.git
*.md
!README.md
tests/
.env
*.example

View File

@@ -18,10 +18,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /build
COPY pyproject.toml ./
RUN pip install --prefix=/install uvicorn fastapi pydantic pydantic-settings \
httpx sqlalchemy asyncpg beautifulsoup4 selectolax trafilatura structlog
COPY README.md ./
COPY src/ ./src/
RUN pip install --prefix=/install .
# ---------- Runtime stage ----------
FROM python:3.12-slim AS runtime
@@ -43,7 +42,6 @@ RUN mkdir -p /app/data && chown -R nsct:nsct /app/data
WORKDIR /app
COPY --from=builder /install /usr/local
COPY src/ ./src/
RUN chown -R nsct:nsct /app

View File

@@ -51,7 +51,7 @@ services:
ports:
- "8888:8080"
volumes:
- searxng_settings:/etc/searxng
- searxng_cache:/var/cache/searxng
environment:
- SEARXNG_BASE_URL=http://localhost:8888/
- SEARXNG_SECRET_KEY=nsct_searxng_secret_key_change_me
@@ -64,6 +64,7 @@ services:
read_only: true
tmpfs:
- /tmp
- /etc/searxng:mode=1777
cap_drop:
- ALL
@@ -79,6 +80,7 @@ services:
environment:
NSCT_DB_URL: postgresql+asyncpg://${POSTGRES_USER:-nsct}:${POSTGRES_PASSWORD:-nsct_secret}@postgres:5432/${POSTGRES_DB:-nsct}
NSCT_LLM_MAX_CONCURRENCY: "${NSCT_LLM_MAX_CONCURRENCY:-3}"
NSCT_SEARXNG_BASE_URL: http://searxng:8080/
depends_on:
postgres:
condition: service_healthy
@@ -103,5 +105,5 @@ volumes:
driver: local
nsct_data:
driver: local
searxng_settings:
searxng_cache:
driver: local

View File

@@ -22,6 +22,7 @@ dependencies = [
"uvicorn>=0.30.0",
"structlog>=24.0.0",
"openai>=3.3.1",
"aiohttp>=3.10.0",
]
[project.optional-dependencies]
@@ -45,7 +46,7 @@ nsct-api = "nsct.cli:main_api"
packages = ["src/nsct"]
[tool.hatch.build.targets.wheel]
packages = ["nsct"]
packages = ["src/nsct"]
[tool.pytest.ini_options]
asyncio_mode = "auto"