diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..01f441d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.venv +.git +__pycache__ +*.pyc +.ruff_cache +.mypy_cache diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..17bb308 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.14-slim AS builder +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ +WORKDIR /app +COPY pyproject.toml uv.lock /app +RUN uv sync --no-install-project --frozen +COPY . /app +RUN uv sync --no-editable --frozen + +FROM python:3.14-slim +WORKDIR /app +COPY --from=builder /app/.venv /app/.venv +ENV PATH="/app/.venv/bin:$PATH" +ENTRYPOINT ["python", "-m", "graphspy", "-i", "0.0.0.0", "-p", "8080"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7c3f56c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + graphspy: + build: . + ports: + - 8080:8080 + volumes: + - ~/.gspy/databases:/root/.gspy/databases + # Overwrite default entrypoint if needed + # entrypoint: "python -m graphspy -i 0.0.0.0 -p 8080"