services:
  postgres:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: velobase
      POSTGRES_PASSWORD: velobase
      POSTGRES_DB: velobase
    ports:
      - "${POSTGRES_PORT:-5432}:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7
    restart: unless-stopped
    ports:
      - "${REDIS_PORT:-6379}:6379"
    volumes:
      - redis_data:/data

  stripe-cli:
    image: stripe/stripe-cli:latest
    profiles: ["stripe"]
    environment:
      STRIPE_API_KEY: ${STRIPE_SECRET_KEY}
    command: >
      listen
      --forward-to http://host.docker.internal:3000/api/webhooks/stripe
      --skip-verify
    extra_hosts:
      - "host.docker.internal:host-gateway"

volumes:
  postgres_data:
  redis_data:
