* feat(dx): implement worktree DB orchestration and graceful dev teardown - feat(dx): [Minor] Implement deterministic port binding per git worktree to mitigate Docker port conflicts during parallel development. - feat(dx): [Minor] Implement graceful development environment teardown using a custom node orchestrator (scripts/dev.mjs) replacing CLI concurrently, enabling cross-platform tree-kill and optional DB stopping on exit. - build(deps): Add tree-kill for process termination. - fix(dx): Prevent rm -rf from orphaning Docker volumes by adding a db:prune script and tying volume cleanup to git-wt remove. * fix: update openid-client api usage to v6 and resolve db import - Migrated processAuthCodeResponse to authorizationCodeGrant - Updated db import to export prisma client correctly - Updated unit tests with v6 openid-client mocks - Bumped version to 2.13.1 * fix(ci): setup .env from example in local dev CI test
95 lines
2.8 KiB
YAML
95 lines
2.8 KiB
YAML
services:
|
|
wwv:
|
|
build:
|
|
context: .
|
|
args:
|
|
- NEXT_PUBLIC_WWV_EDITION=${NEXT_PUBLIC_WWV_EDITION:-local}
|
|
- NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL=${NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL:-}
|
|
- NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL:-}
|
|
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY:-}
|
|
- NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=${NEXT_PUBLIC_GOOGLE_MAPS_API_KEY:-}
|
|
- NEXT_PUBLIC_BING_MAPS_KEY=${NEXT_PUBLIC_BING_MAPS_KEY:-}
|
|
- NEXT_PUBLIC_CESIUM_ION_TOKEN=${NEXT_PUBLIC_CESIUM_ION_TOKEN:-}
|
|
- NEXT_PUBLIC_ADSENSE_CLIENT_ID=${NEXT_PUBLIC_ADSENSE_CLIENT_ID:-}
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- wwv-data:/app/data
|
|
- ./public/plugins-local:/app/public/plugins-local:ro
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
- "AUTH_SECRET=${AUTH_SECRET:-default_secret_for_local_dev}"
|
|
- "WWV_DEMO_ADMIN_SECRET=${WWV_DEMO_ADMIN_SECRET:-}"
|
|
- "WWV_BRIDGE_TOKEN=${WWV_BRIDGE_TOKEN:-}"
|
|
- "DATABASE_URL=postgresql://postgres:postgres@db:5432/worldwideview?schema=public"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: worldwideview
|
|
ports:
|
|
- "${WWV_DB_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d worldwideview"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 60s
|
|
|
|
wwv-data-engine:
|
|
image: ghcr.io/silvertakana/wwv-data-engine:latest
|
|
command: >
|
|
sh -c "
|
|
echo 'Syncing workspace dependencies...' &&
|
|
cd $$SEEDERS_DIR/community && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild &&
|
|
if [ -d \"$$SEEDERS_DIR/private\" ]; then cd $$SEEDERS_DIR/private && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild; fi &&
|
|
cd /app && node dist/server.js"
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- PORT=5000
|
|
- REDIS_URL=redis://wwv-redis:6379
|
|
- SEEDERS_DIR=/app/seeders
|
|
- DB_PATH=/app/data/engine.db
|
|
depends_on:
|
|
wwv-redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
profiles:
|
|
- engine
|
|
|
|
wwv-redis:
|
|
image: redis:7-alpine
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
profiles:
|
|
- engine
|
|
|
|
networks:
|
|
coolify:
|
|
external: true
|
|
|
|
volumes:
|
|
wwv-data:
|
|
postgres-data:
|