name: "DC_Slideshow_local"

services:
  mysql:
    build:
      context: .
      dockerfile: dev.Dockerfile
    container_name: DC_Slideshow_mysql
    restart: unless-stopped
    env_file: ".env"
    user: "${USER_ID:-1000}:${USER_GROUP_ID:-1000}"
    ports:
      - "${MYSQL_PORT:-3306}:3306"
    networks:
      - DC_Slideshow_network
    # Security: Run with limited capabilities
    cap_drop:
      - ALL
    cap_add:
      - SETUID
      - SETGID
      - DAC_OVERRIDE
    # Prevent privilege escalation
    security_opt:
      - no-new-privileges:true
    volumes:
      - ./db/mysql_data:/var/lib/mysql
      - ./db/mysql_logs:/var/log/mysql

networks:
  DC_Slideshow_network:
    driver: bridge
