Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Dec 31, 2024
2 parents dad71c8 + 36f782f commit 6a244bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Install dependencies
env: { UV_SYSTEM_PYTHON: true }
run: |
pip install uv --disable-pip-version-check
uv tool run pdm export --pyproject -d | uv pip install -r -
uv export --no-hashes | uv pip install -r - basedpyright
- name: Check formatting
run: |
isort . --check --diff
Expand All @@ -24,4 +24,4 @@ jobs:
black . --check --diff
- name: Check typing
run: |
npx pyright
basedpyright
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ WORKDIR /app
COPY frontend/package.json /
RUN bun install
COPY frontend .
RUN NODE_ENV=production bun run build
RUN NODE_ENV=production bun run -b build

FROM python:3.13-slim AS py
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS py
WORKDIR /app
COPY pyproject.toml .
RUN pip install uv --disable-pip-version-check --root-user-action ignore && uv venv && uv sync --compile-bytecode
RUN uv sync --compile-bytecode

FROM python:3.13-slim AS base
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS base
WORKDIR /app
COPY --from=js /app/dist frontend/dist
COPY --from=py /app .
COPY . .

ENV PORT=9040
ENV PATH="/app/.venv/bin:$PATH"

EXPOSE $PORT

CMD python3 -O -m uvicorn src.entry:app --host 0.0.0.0 --port $PORT
CMD .venv/bin/python -O -m uvicorn src.entry:app --host 0.0.0.0 --port $PORT
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prettier-plugin-svelte": "^3.2.4",
"svelte": "^4.2.18",
"svelte-check": "^4.0.0",
"svelte-eslint-parser": "^0.42.0",
"svelte-eslint-parser": "^0.43.0",
"tslib": "^2.6.3",
"typescript": "^5.4.5",
"unocss": "^0.61.0",
Expand Down

0 comments on commit 6a244bc

Please sign in to comment.