# ============================================================================ # PlayRun -- one-command local demo # ============================================================================ # Brings up the whole app with its dependencies. Runs in SIMULATION MODE # (IS_K8S_ENABLED=false): the full UI and run lifecycle work against fake test # progress -- no Kubernetes, registry, or cloud needed. This is the easiest way # to try PlayRun. # # docker compose up --build # then open http://localhost:3000 # (log in with ANY email -- the dev login is enabled) # # For REAL Playwright runs you need Kubernetes; see docs/DEPLOYMENT.md. # ============================================================================ name: playrun services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: playrun POSTGRES_PASSWORD: playrun POSTGRES_DB: playrun # Not published to the host -- the app reaches it over the compose network. # Avoids clashing with a Postgres you may already run on :5432. volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U playrun -d playrun"] interval: 5s timeout: 5s retries: 15 # Apply the Prisma schema, then exit. The runtime image is a minimal Next.js # standalone build without the Prisma CLI, so migrations run from the build # stage (which has the full toolchain). migrate: build: context: . target: builder command: ["npx", "prisma", "migrate", "deploy"] environment: DATABASE_URL: "postgresql://playrun:playrun@postgres:5432/playrun?schema=public" depends_on: postgres: condition: service_healthy restart: "no" playrun: build: context: . ports: - "3000:3000" environment: # --- core --- DATABASE_URL: "postgresql://playrun:playrun@postgres:5432/playrun?schema=public" HOSTNAME: "0.0.0.0" PORT: "3000" # --- app secrets (demo values -- regenerate for anything real) --- NEXTAUTH_SECRET: "dev-only-change-me-000000000000000000000000" ENV_SECRET_KEY: "dev-only-change-me-111111111111111111111111" NEXTAUTH_URL: "http://localhost:3000" PLAYRUN_PUBLIC_URL: "http://localhost:3000" # --- auth: email-only dev login (no IdP). Demo only. --- AUTH_ALLOW_DEV_LOGIN: "true" # --- simulation mode: no Kubernetes needed --- IS_K8S_ENABLED: "false" # --- S3 (MinIO): only exercised once you connect a real cluster --- S3_BUCKET: "playrun-reports" S3_REGION: "us-east-1" S3_ENDPOINT: "http://minio:9000" S3_ENDPOINT_K8S: "http://minio:9000" S3_FORCE_PATH_STYLE: "true" AWS_ACCESS_KEY_ID: "playrun" AWS_SECRET_ACCESS_KEY: "playrunplayrun" depends_on: postgres: condition: service_healthy migrate: condition: service_completed_successfully healthcheck: # Node 22 has global fetch; avoids needing curl/wget in the slim image. test: ["CMD-SHELL", "node -e \"fetch('http://localhost:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""] interval: 10s timeout: 5s retries: 12 start_period: 20s # Object storage (S3-compatible). Included so the stack is complete; in # simulation mode nothing writes to it yet. Console at http://localhost:9001 # (login playrun / playrunplayrun). minio: image: minio/minio command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: "playrun" MINIO_ROOT_PASSWORD: "playrunplayrun" ports: - "9000:9000" - "9001:9001" volumes: - miniodata:/data # Create the reports bucket once MinIO is up, then exit. createbucket: image: minio/mc depends_on: - minio entrypoint: > /bin/sh -c " until mc alias set local http://minio:9000 playrun playrunplayrun; do sleep 1; done; mc mb --ignore-existing local/playrun-reports; exit 0; " restart: "no" volumes: pgdata: miniodata: