Preview/storyboard worker for self-hosted Layers installations
300
Worker service that generates previews/storyboards for video attachments — an optional App Store module for self-hosted Layers installations.
It connects to the same Postgres DB as the core server (hissih/layers) and writes storyboard artifacts into the same shared volume, so the core server can serve:
/v1/storyboards/attachment/<attachmentId>/index.vtt/v1/storyboards/attachment/<attachmentId>/meta.json/v1/storyboards/attachment/<attachmentId>/sheet_<N>.jpgsinups/layers-preview:<version> — pinned semver (e.g. 1.0.3)sinups/layers-preview:latest — rolling tag, rebuilt on every push to mainAll tags are multi-arch manifest lists (linux/amd64 + linux/arm64), so Apple Silicon and Graviton hosts run natively without QEMU emulation.
hissih/layers)A single set of credentials powers core + every plugin. The module reads:
| Variable | Required | Description |
|---|---|---|
DB_SERVER_URL | yes | JDBC URL for the core Postgres (e.g. jdbc:postgresql://db:5432/layersdb). |
DB_SERVER_USERNAME | yes | DB user — same one core uses. |
DB_SERVER_PASSWORD | yes | DB password. |
PREVIEW_ADMIN_BIND | no (default 127.0.0.1) | Bind address for the worker's admin port. Use 0.0.0.0 inside Docker. |
PREVIEW_ADMIN_PORT | no (default 8082) | Admin port. |
USE_AWS | no | Set true to upload storyboards to S3. |
S3_BUCKET_NAME, S3_ACCESS_KEY, S3_SECRET_KEY | if USE_AWS=true | S3 target. |
Legacy SPRING_DATASOURCE_URL / SPRING_DATASOURCE_USERNAME / SPRING_DATASOURCE_PASSWORD are still accepted as a fallback for pre-1.0.3 installs — but new installs should use the unified DB_SERVER_* names.
docker-compose (core + preview)Add this stanza to the core stack's docker-compose.yml:
services:
preview:
image: sinups/layers-preview:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
# Same three vars the core app already has — no duplication.
DB_SERVER_URL: ${DB_SERVER_URL}
DB_SERVER_USERNAME: ${DB_SERVER_USERNAME}
DB_SERVER_PASSWORD: ${DB_SERVER_PASSWORD}
PREVIEW_ADMIN_BIND: 0.0.0.0
volumes:
# Shared with core so generated storyboards are visible to both.
- layers_data:/opt/maker/java-maker/uploaded-files
Then:
docker compose pull preview && docker compose up -d preview
docker rundocker run --rm \
-e DB_SERVER_URL='jdbc:postgresql://db:5432/layersdb' \
-e DB_SERVER_USERNAME='layers' \
-e DB_SERVER_PASSWORD='changeme' \
-e PREVIEW_ADMIN_BIND=0.0.0.0 \
-v layers_data:/opt/maker/java-maker/uploaded-files \
--network layers-default \
sinups/layers-preview:latest
This repo depends on com.layers:layers-shared:1.0.0.
cd ../layers-shared && mvn -q -DskipTests install
cd ../layers-preview && ./mvnw -q -DskipTests package
spring.main.web-application-type=none (no web UI).layers-preview uploads storyboards to S3 (best-effort)./v1/storyboards/** from S3 when local files are missing (server profile, behind the same flag).Content type
Image
Digest
sha256:010d39ad6…
Size
959.5 MB
Last updated
5 months ago
docker pull sinups/layers-preview