docs: update Dockerfile, README, env.example for image-converter
This commit is contained in:
@@ -57,4 +57,9 @@ EVENT_BUS_BACKEND=db
|
|||||||
# NATS_STREAM_NAME=MOVIES_DIARY_EVENTS
|
# NATS_STREAM_NAME=MOVIES_DIARY_EVENTS
|
||||||
# NATS_CONSUMER_NAME=worker
|
# NATS_CONSUMER_NAME=worker
|
||||||
|
|
||||||
|
# Image conversion (optional — converts stored images to save disk space)
|
||||||
|
# Disable by default; enable in the worker by setting ENABLED=true.
|
||||||
|
# IMAGE_CONVERSION_ENABLED=false
|
||||||
|
# IMAGE_CONVERSION_FORMAT=avif # avif | webp
|
||||||
|
|
||||||
RUST_LOG=presentation=debug,tower_http=debug,worker=info,application=info
|
RUST_LOG=presentation=debug,tower_http=debug,worker=info,application=info
|
||||||
|
|||||||
@@ -33,12 +33,19 @@ COPY crates/adapters/tmdb-enrichment/Cargo.toml crates/adapters/tmdb-enrichmen
|
|||||||
COPY crates/domain/Cargo.toml crates/domain/Cargo.toml
|
COPY crates/domain/Cargo.toml crates/domain/Cargo.toml
|
||||||
COPY crates/presentation/Cargo.toml crates/presentation/Cargo.toml
|
COPY crates/presentation/Cargo.toml crates/presentation/Cargo.toml
|
||||||
COPY crates/tui/Cargo.toml crates/tui/Cargo.toml
|
COPY crates/tui/Cargo.toml crates/tui/Cargo.toml
|
||||||
|
COPY crates/adapters/image-converter/Cargo.toml crates/adapters/image-converter/Cargo.toml
|
||||||
COPY crates/worker/Cargo.toml crates/worker/Cargo.toml
|
COPY crates/worker/Cargo.toml crates/worker/Cargo.toml
|
||||||
|
|
||||||
# Stub every crate so cargo can resolve and fetch deps
|
# Stub every crate so cargo can resolve and fetch deps
|
||||||
RUN find crates -name "Cargo.toml" | sed 's|/Cargo.toml||' | \
|
RUN find crates -name "Cargo.toml" | sed 's|/Cargo.toml||' | \
|
||||||
xargs -I{} sh -c 'mkdir -p {}/src && echo "fn main(){}" > {}/src/main.rs && echo "" > {}/src/lib.rs'
|
xargs -I{} sh -c 'mkdir -p {}/src && echo "fn main(){}" > {}/src/main.rs && echo "" > {}/src/lib.rs'
|
||||||
|
|
||||||
|
# libwebp-dev: required at build time by the `webp` crate (C bindings)
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
libwebp-dev \
|
||||||
|
pkg-config \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
|
||||||
# Now copy real sources (invalidates cache only on source changes)
|
# Now copy real sources (invalidates cache only on source changes)
|
||||||
@@ -60,6 +67,7 @@ FROM debian:bookworm-slim
|
|||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
wget \
|
wget \
|
||||||
|
libwebp7 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ adapters/
|
|||||||
poster-fetcher — downloads poster images
|
poster-fetcher — downloads poster images
|
||||||
image-storage — stores images (posters + user avatars) on local filesystem or S3-compatible storage
|
image-storage — stores images (posters + user avatars) on local filesystem or S3-compatible storage
|
||||||
poster-sync — event handler: triggers poster fetch+store on MovieDiscovered
|
poster-sync — event handler: triggers poster fetch+store on MovieDiscovered
|
||||||
|
image-converter — optional background worker: converts stored images to AVIF or WebP; backfills existing images via a 24h periodic job
|
||||||
tmdb-enrichment — event handler: fetches full movie profile (cast, crew, genres, keywords, box office) from TMDb on MovieEnrichmentRequested; resolves IMDb IDs automatically
|
tmdb-enrichment — event handler: fetches full movie profile (cast, crew, genres, keywords, box office) from TMDb on MovieEnrichmentRequested; resolves IMDb IDs automatically
|
||||||
template-askama — Askama HTML rendering
|
template-askama — Askama HTML rendering
|
||||||
rss — RSS/Atom feed generation
|
rss — RSS/Atom feed generation
|
||||||
@@ -96,6 +97,10 @@ IMAGE_STORAGE_PATH=./images
|
|||||||
# MINIO_ACCESS_KEY_ID=minioadmin
|
# MINIO_ACCESS_KEY_ID=minioadmin
|
||||||
# MINIO_SECRET_ACCESS_KEY=minioadmin
|
# MINIO_SECRET_ACCESS_KEY=minioadmin
|
||||||
|
|
||||||
|
# Image conversion (optional — converts stored images to AVIF or WebP to save space)
|
||||||
|
# IMAGE_CONVERSION_ENABLED=false
|
||||||
|
# IMAGE_CONVERSION_FORMAT=avif # avif or webp
|
||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
PORT=3000
|
PORT=3000
|
||||||
|
|||||||
Reference in New Issue
Block a user