Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
# Try the site on any machine, against the synthetic fixture content and fixture sources:
|
|
# no token, no proxy, no secrets. From the repository root:
|
|
#
|
|
# docker compose -f deploy/compose.local.yml up --build
|
|
# open http://localhost:8080/ (and /status; SITE_PORT=… picks another port)
|
|
#
|
|
# `seed` turns fixtures/content into a git repository in a volume, owned by the
|
|
# app's uid, and the app polls it like it would poll Gitea. SOURCES_FIXTURES makes
|
|
# Ghost, Trakt and Hardcover read fixtures/sources instead of the network.
|
|
# `docker compose -f deploy/compose.local.yml down -v` removes everything.
|
|
services:
|
|
seed:
|
|
image: portfolio-next:local
|
|
build: ..
|
|
user: root
|
|
entrypoint: ["sh", "-c"]
|
|
command:
|
|
- |
|
|
set -e
|
|
if [ ! -d /content/.git ]; then
|
|
cp -r /fixtures/. /content/
|
|
git -C /content init -q -b main
|
|
git -C /content add -A
|
|
git -C /content -c user.name=seed -c user.email=seed@example.com commit -q -m "demo content"
|
|
fi
|
|
chown -R 1000:1000 /content
|
|
volumes:
|
|
- ../fixtures/content:/fixtures:ro
|
|
- content:/content
|
|
|
|
portfolio-next:
|
|
image: portfolio-next:local
|
|
build: ..
|
|
depends_on:
|
|
seed:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
CONTENT_REPO: /content
|
|
POLL_INTERVAL: 30s
|
|
SOURCES_FIXTURES: /sources
|
|
ports:
|
|
- "${SITE_PORT:-8080}:8080"
|
|
volumes:
|
|
- content:/content:ro
|
|
- ../fixtures/sources:/sources:ro
|
|
- data:/data
|
|
|
|
volumes:
|
|
content:
|
|
data:
|