Compare commits
5 Commits
5ffce8189d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dbb67ba84 | ||
|
|
94abb7388b | ||
|
|
c1f940fa57 | ||
|
|
03e8fa18f3 | ||
|
|
a7861455d9 |
@@ -25,7 +25,7 @@ jobs:
|
|||||||
apk add --no-cache nodejs npm git
|
apk add --no-cache nodejs npm git
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v25.4.0
|
25.5.0
|
||||||
|
|||||||
18
Dockerfile
18
Dockerfile
@@ -1,43 +1,31 @@
|
|||||||
# Stage 1: Build the Next.js frontend
|
FROM docker.io/library/node:25 AS frontend-builder
|
||||||
FROM docker.io/library/node:24-alpine AS frontend-builder
|
|
||||||
LABEL authors="lucasoskorep"
|
LABEL authors="lucasoskorep"
|
||||||
|
|
||||||
WORKDIR /build/mta-sign-ui
|
WORKDIR /build/mta-sign-ui
|
||||||
|
|
||||||
# Enable corepack for pnpm
|
|
||||||
RUN corepack enable && corepack prepare pnpm@10.28.1 --activate
|
|
||||||
|
|
||||||
# Copy package files first for better caching
|
|
||||||
COPY mta-sign-ui/package.json mta-sign-ui/pnpm-lock.yaml* ./
|
COPY mta-sign-ui/package.json mta-sign-ui/pnpm-lock.yaml* ./
|
||||||
|
|
||||||
# Install dependencies (use frozen-lockfile if lock exists, otherwise generate)
|
RUN npm install -g pnpm
|
||||||
RUN pnpm install
|
|
||||||
|
|
||||||
# Copy the rest of the frontend source
|
|
||||||
COPY mta-sign-ui/ ./
|
COPY mta-sign-ui/ ./
|
||||||
|
|
||||||
# Build the static export (outputs to 'out' directory)
|
RUN pnpm install
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# Stage 2: Python backend with frontend static files
|
|
||||||
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
|
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
|
||||||
LABEL authors="lucasoskorep"
|
LABEL authors="lucasoskorep"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy dependency files and install dependencies only (not the project itself)
|
|
||||||
COPY pyproject.toml uv.lock README.md ./
|
COPY pyproject.toml uv.lock README.md ./
|
||||||
RUN uv sync --frozen --no-dev --no-install-project
|
RUN uv sync --frozen --no-dev --no-install-project
|
||||||
|
|
||||||
# Copy source code
|
|
||||||
COPY mta_api_client ./mta_api_client
|
COPY mta_api_client ./mta_api_client
|
||||||
COPY mta_sign_server ./mta_sign_server
|
COPY mta_sign_server ./mta_sign_server
|
||||||
COPY main.py stops.txt ./
|
COPY main.py stops.txt ./
|
||||||
|
|
||||||
# Copy the built frontend from the first stage
|
|
||||||
COPY --from=frontend-builder /build/mta-sign-ui/out ./static
|
COPY --from=frontend-builder /build/mta-sign-ui/out ./static
|
||||||
|
|
||||||
# Now install the project
|
|
||||||
RUN uv sync --frozen --no-dev
|
RUN uv sync --frozen --no-dev
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
4
justfile
4
justfile
@@ -65,9 +65,9 @@ build-ui:
|
|||||||
|
|
||||||
# Build multi-arch container image
|
# Build multi-arch container image
|
||||||
containers:
|
containers:
|
||||||
podman build --platform linux/arm64,linux/amd64 -f docker/Dockerfile --manifest chaos2theory/pi-mta-sign:test .
|
podman build --platform linux/arm64,linux/amd64 -f Dockerfile --manifest chaos2theory/pi-mta-sign:test .
|
||||||
podman manifest push --all chaos2theory/pi-mta-sign:test
|
podman manifest push --all chaos2theory/pi-mta-sign:test
|
||||||
podman manifest rm chaos2theory/pi-mta-sign:test
|
podman manifest rm chaos2theory/pi-mta-sign:testpod
|
||||||
|
|
||||||
# Build container image (local arch only)
|
# Build container image (local arch only)
|
||||||
build-container:
|
build-container:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
v20
|
|
||||||
2
mta-sign-ui/next-env.d.ts
vendored
2
mta-sign-ui/next-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/dev/types/routes.d.ts";
|
import "./.next/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
@@ -26,16 +26,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/react": "^16.1.0",
|
"@testing-library/react": "^16.1.0",
|
||||||
"@types/node": "^22.10.7",
|
"@types/node": "^25.0.0",
|
||||||
"@types/react": "^19.0.7",
|
"@types/react": "^19.0.7",
|
||||||
"@types/react-dom": "^19.0.3",
|
"@types/react-dom": "^19.0.3",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^5.0.0",
|
||||||
"chokidar-cli": "^3.0.0",
|
"chokidar-cli": "^3.0.0",
|
||||||
"eslint": "^9.18.0",
|
"eslint": "^9.18.0",
|
||||||
"eslint-config-next": "^16.1.2",
|
"eslint-config-next": "^16.1.2",
|
||||||
"jsdom": "^26.0.0",
|
"jsdom": "^27.0.0",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
"vitest": "^3.0.0"
|
"vitest": "^4.0.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.28.1"
|
"packageManager": "pnpm@10.28.2"
|
||||||
}
|
}
|
||||||
|
|||||||
950
mta-sign-ui/pnpm-lock.yaml
generated
950
mta-sign-ui/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"packageManager": "yarn@4.1.0"
|
"packageManager": "yarn@4.12.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"matchPackageNames": ["tailwindcss"],
|
||||||
|
"allowedVersions": "<4.0.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user