Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git
.indexion
.env
.env.*
!.env.example
**/node_modules
**/target
**/.output
**/.nitro
**/dist
db-data
backup
*.log
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ backups/**

# Temp
gitignores
db-data/
db-data*/
backup/

# System Files
.DS_Store
Expand Down
40 changes: 37 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
FROM oven/bun:debian

# Install python3, ffmpeg, and ca-certificates for yt-dlp and media processing
# Install the native build toolchain, Python for the CPU ONNX Runtime package,
# ffmpeg, and certificates for media processing.
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
ffmpeg \
build-essential \
ca-certificates \
curl \
ffmpeg \
libssl-dev \
pkg-config \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

# dghs-imgutils-rs is a Rust N-API addon and requires a current Rust toolchain
# during bun install. The addon loads the runtime dynamically at application
# startup, so keep the compatible CPU runtime beside its provider library.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"

RUN python3 -m pip install --no-cache-dir --target /tmp/onnxruntime \
onnxruntime==1.24.2 \
&& mkdir -p /usr/local/lib/onnxruntime \
&& find /tmp/onnxruntime/onnxruntime/capi -maxdepth 1 -type f \
-name 'libonnxruntime*.so*' \
-exec cp {} /usr/local/lib/onnxruntime/ \; \
&& test -f /usr/local/lib/onnxruntime/libonnxruntime.so.1.24.2 \
&& test -f /usr/local/lib/onnxruntime/libonnxruntime_providers_shared.so \
&& rm -rf /tmp/onnxruntime

ENV ORT_DYLIB_PATH="/usr/local/lib/onnxruntime/libonnxruntime.so.1.24.2"
ENV LD_LIBRARY_PATH="/usr/local/lib/onnxruntime"
ENV DGHS_BACKEND="cpu"
ENV DGHS_PRECISION="fp32"

WORKDIR /app

COPY . .

RUN bun install --frozen-lockfile
RUN bun run --cwd apps/server validate:native
RUN bun run --cwd apps/server build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ CPU のみで使用する場合は通常通り `bun install` してください
- **Tauri SPA**: [`apps/tauri/src/`](./apps/tauri/src/)、Rust側 [`apps/tauri/src-tauri/`](./apps/tauri/src-tauri/)
- **V2移行状況**: [REPORT.md](./REPORT.md)
- **DBスキーマ**: `packages/db/src/schema.ts`
- **本番DB移行**: [PostgreSQL 18 / UUIDv7移行手順](./docs/operations/postgresql-18-uuidv7-migration.md)
- **開発ルール**: [AGENTS.md](./AGENTS.md)
19 changes: 19 additions & 0 deletions apps/server/drizzle/0027_acoustic_impossible_man.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ALTER TABLE "author_accounts" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "authors" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "ccip_embeddings" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "characters" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "ips" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "jobs" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "media_regions" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "media_relations" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "media_sources" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "media_urls" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "media" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "projects" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "search_snapshots" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "similar_media" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "tags" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "id" SET DEFAULT uuidv7();--> statement-breakpoint
ALTER TABLE "view_history" ALTER COLUMN "id" SET DEFAULT uuidv7();
Loading