version: "3.9"

networks:
  edr-network:
    driver: bridge

volumes:
  postgres-freight-data:
  redis-data:

services:
  postgres-freight:
    image: postgres:17-alpine
    container_name: edr-postgres-freight
    restart: unless-stopped
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: edr_freight
    ports:
      - "5433:5432"
    volumes:
      - postgres-freight-data:/var/lib/postgresql/data
    networks:
      - edr-network

  redis:
    image: redis:7-alpine
    container_name: edr-redis
    restart: unless-stopped
    ports:
      - "6379:6379"
    volumes:
      - redis-data:/data
    networks:
      - edr-network