Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ ENV/
.idea/

backend/media/
backend/assets/build/

node_modules/

Expand Down
9 changes: 9 additions & 0 deletions Dockerfile.python.local
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ARG FUNCTION_DIR="/home/app/"

FROM node:24-slim AS node-stage

FROM python:3.13.5

RUN apt update -y && apt install -y ffmpeg libsm6 libxext6
Expand All @@ -11,6 +13,13 @@ WORKDIR ${FUNCTION_DIR}

RUN pip install uv==0.5.5

COPY --from=node-stage /usr/local/bin/node /usr/local/bin/node
COPY --from=node-stage /usr/local/lib/node_modules /usr/local/lib/node_modules

RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \
npm install --global pnpm

RUN mkdir -p ${FUNCTION_DIR}/assets

COPY . ${FUNCTION_DIR}
1 change: 1 addition & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cov.xml
**/__pycache__/**
.pdm-python
**/.pytest_cache/**
assets/build/
Dockerfile
**/_dist/**
**/backend/media
Expand Down
13 changes: 13 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ COPY custom_admin/ .

RUN ADMIN_GRAPHQL_URL=schema.graphql pnpm codegen && pnpm build

# Build the Inertia dashboard

WORKDIR ${FUNCTION_DIR}/dashboard

COPY dashboard/package.json dashboard/pnpm-lock.yaml ./

RUN pnpm install --frozen-lockfile

COPY dashboard/ ./

RUN pnpm build

# Runtime stage

FROM base AS runtime-stage
Expand All @@ -81,6 +93,7 @@ ENV NLTK_DATA=/home/app/nltk_data
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/widgets/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/widgets/
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/_astro ${FUNCTION_DIR}/custom_admin/static/_astro/
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/assets/build ${FUNCTION_DIR}/assets/build/
COPY --chown=app:app --from=build-stage ${FUNCTION_DIR}/.venv ${FUNCTION_DIR}/.venv

COPY --chown=app:app . ${FUNCTION_DIR}
Expand Down
1 change: 1 addition & 0 deletions backend/dashboard/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 6 additions & 0 deletions backend/dashboard/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class DashboardConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "dashboard"
24 changes: 24 additions & 0 deletions backend/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "pycon-dashboard",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"build": "tsc --noEmit && vite build",
"dev": "vite"
},
"dependencies": {
"@inertiajs/react": "3.6.1",
"react": "19.2.8",
"react-dom": "19.2.8"
},
"devDependencies": {
"@tailwindcss/vite": "4.3.3",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.4",
"@vitejs/plugin-react": "6.0.5",
"tailwindcss": "4.3.3",
"typescript": "7.0.2",
"vite": "8.2.0"
}
}
Loading
Loading