services:
  mariadb:
    image: mariadb:10.11
    container_name: ${CONTAINER_NAME}
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
      MYSQL_DATABASE: ${DB_NAME}
      MYSQL_USER: ${DB_USER}
      MYSQL_PASSWORD: ${DB_PASSWORD}
    volumes:
      - "${DB_PATH:-./mariadb-data}:/var/lib/mysql"
    ports:
      - "${DB_HOST}:${DB_PORT}:3306"
    networks:
      - internal

networks:
  internal:
    driver: bridge