services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: petmaster POSTGRES_USER: petmaster POSTGRES_PASSWORD: petmaster_secret ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U petmaster"] interval: 5s timeout: 5s retries: 5 api: build: context: ./api dockerfile: Dockerfile ports: - "3000:3000" environment: DATABASE_URL: postgresql://petmaster:petmaster_secret@postgres:5432/petmaster?schema=public STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-sk_test_placeholder} STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-whsec_placeholder} JWT_SECRET: ${JWT_SECRET:-change-me-in-production} CORS_ORIGIN: http://localhost:3001 depends_on: postgres: condition: service_healthy volumes: - ./api/src:/app/src # hot-reload in dev command: > sh -c "npx prisma migrate deploy && npm run start:dev" web: build: context: ./web dockerfile: Dockerfile ports: - "3001:3001" environment: REACT_APP_API_URL: http://localhost:3000 depends_on: - api volumes: pgdata: