53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
# Development Docker Compose (self-contained).
|
|
# This file defines both the app (with live reload) and the db.
|
|
#
|
|
# Usage (from project root):
|
|
# docker compose -f docker-compose.dev.yml up --build
|
|
#
|
|
# After first start the database migrations run automatically before the dev server.
|
|
# Stop with: docker compose -f docker-compose.dev.yml down
|
|
#
|
|
# For production-like: docker compose -f docker-compose.yml up
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
target: deps
|
|
command: sh -c "npm run db:migrate && npm run dev"
|
|
working_dir: /app
|
|
volumes:
|
|
- .:/app
|
|
- /app/node_modules
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
DATABASE_URL: postgresql://film:film@db:5432/film
|
|
TMDB_API_KEY: ${TMDB_API_KEY}
|
|
LLM_API_KEY: ${LLM_API_KEY}
|
|
LLM_BASE_URL: ${LLM_BASE_URL:-https://openrouter.ai/api/v1}
|
|
LLM_MODEL: ${LLM_MODEL:-openai/gpt-4o-mini}
|
|
LLM_HTTP_REFERER: ${LLM_HTTP_REFERER:-http://localhost:3000}
|
|
LLM_APP_TITLE: ${LLM_APP_TITLE:-Film Intel}
|
|
WATCHPACK_POLLING: "true"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: film
|
|
POSTGRES_PASSWORD: film
|
|
POSTGRES_DB: film
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U film -d film"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata: |