build / image (push) Failing after 15s
- Linktree-style homepage with photo, social links, and self-hosted services (container registry, Git server) - Registry pages rendered on demand from Harbor via a live content collection, cached in memory (60s fresh, 10min stale-while-revalidate) - Pinned registry images (PINNED_IMAGES) shown first with a star - Node standalone server with security headers; self-contained server build so the Docker image ships no node_modules - Gitea workflow building multi-arch images for Flux Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
799 B
TypeScript
25 lines
799 B
TypeScript
import { defineLiveCollection } from 'astro:content';
|
|
import {
|
|
HARBOR_PASSWORD,
|
|
HARBOR_PROJECTS,
|
|
HARBOR_REGISTRY_HOST,
|
|
HARBOR_URL,
|
|
HARBOR_USERNAME,
|
|
} from 'astro:env/server';
|
|
import { harborLoader, repositorySchema } from './loaders/harbor';
|
|
|
|
// Read at request time from the server environment; nothing here reaches the client.
|
|
// Compose passes unset variables as empty strings, hence the `|| undefined`.
|
|
const registry = defineLiveCollection({
|
|
loader: harborLoader({
|
|
url: HARBOR_URL || undefined,
|
|
registryHost: HARBOR_REGISTRY_HOST || undefined,
|
|
projects: HARBOR_PROJECTS?.split(',').map((p) => p.trim()).filter(Boolean),
|
|
username: HARBOR_USERNAME || undefined,
|
|
password: HARBOR_PASSWORD || undefined,
|
|
}),
|
|
schema: repositorySchema,
|
|
});
|
|
|
|
export const collections = { registry };
|