version: '3.8'
services:
  web:
    build: .
    command: gunicorn kiwicrib.wsgi:application --bind 0.0.0.0:8000 --workers 3
    env_file:
      - .env
    ports:
      - "8000:8000"
    depends_on:
      - db
    volumes:
      - .:/app
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: ${POSTGRES_DB:-kiwicrib}
      POSTGRES_USER: ${POSTGRES_USER:-kiwicrib}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-kiwicrib}
    volumes:
      - pgdata:/var/lib/postgresql/data
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

volumes:
  pgdata:
