# Makefile Development Documentation

## Table of Contents

- [Overview](#overview)
- [Environment Variables](#environment-variables)
- [Docker Operations](#docker-operations)
- [Composer Commands](#composer-commands)
- [Doctrine Migration](#doctrine-migration)
- [Class Generators](#class-generators)
- [Redis Commands](#redis-commands)
- [Data Anonymization](#data-anonymization)
- [Grunt Tasks](#grunt-tasks)

## Overview

This Makefile provides a set of commands to manage Docker containers, handle composer dependencies, manage database migrations, and more. It's designed to streamline the development process and ensure consistent operations.

## Environment Variables

- **UID**: User ID of the current user.
- **GID**: Group ID of the current user.
- **WEBSERVER_NAME**: Name of the web server container.
- **REDIS_CONTAINER_NAME**: Name of the Redis container.
- **GRUNT_CONTAINER_NAME**: Name of the Grunt container.
- **NETWORK_NAME**: Name of the Docker network.
- **DOCKER_COMPOSE**: Command to run Docker Compose with user and group ID.

## Docker Operations

- **build**: Initializes the Docker environment.
    - Sets up the Docker stack.
    - Builds containers.
    - Installs composer dependencies.
    - Runs migrations.
- **run/up**: Equivalent to `build` but without the Dockerfile build.
- **stop/down**: Stops all containers.
- **clean**: Stops and removes all containers.
- **logs**: Displays logs for all containers.
- **bash**: Accesses the bash shell of the web server container.

## Composer Commands

- **composer**: Installs composer dependencies in the `src/common/` directory.
- **composer_update**: Updates composer dependencies in the `src/common/` directory.

## Doctrine Migration

- **migration**: Executes migrations for Media Manager and License.
- **migration_media_manager_prev**: Rolls back the last migration for Media Manager.
- **migration_licence_prev**: Rolls back the last migration for License.
- **migration_licence_delete**: Deletes a specific version of License migration.
- **migration_media_manager_generate**: Generates a new migration for Media Manager.
- **migration_licence_generate**: Generates a new migration for License.
- **migration_media_manager_down**: Revert one migration for Media Manager.
- **migration_media_manager_up**: Run one migration for Media Manager.

## Class Generators

- **esm_generate**: Generates Entity, Service, and Manager classes.
- **migration_licence_content_generate**: Generates migration content for License.

## Redis Commands

- **redis_flushall**: Flushes all data from Redis.

## Data Anonymization

- **anonymize_data**: Anonymizes data based on provided parameters.

## Grunt Tasks

- **grunt_watch**: Watches for changes using Grunt.
- **grunt_cssmin**: Minifies CSS using Grunt.
- **grunt_logs**: Displays logs for Grunt.
