services:
  postgres:
    image: postgres:16
    environment:
      POSTGRES_USER: test
      POSTGRES_PASSWORD: test
      POSTGRES_DB: compton_test
    ports:
      - "5433:5432"

  redis:
    image: redis:7-alpine
    ports:
      - "6380:6379"

  api:
    build: ./apps/api
    env_file:
      - ./apps/api/.env.test
    environment:
      DATABASE_URL: postgresql+psycopg://test:test@postgres:5432/compton_test
    depends_on:
      - postgres
      - redis
    ports:
      - "8001:8000"

  web:
    build: ./apps/web
    depends_on:
      - api
    ports:
      - "5175:5173"
