<commit_before>---
title: "Understanding Stack Configurations"
weight: 1
aliases:
  - /en/master/advanced/stack-config/
---
1. [Basics](#basics)
2. [Project configuration files](#docksal-yml)
3. [Default stacks](#default-configurations)
4. [Configuration files loading order](#loading-order)

## Basics {#basics}

Docksal relies on [Docker Compose](https://docs.docker.com/compose/) to launch groups of related containers.
The yml files you use are [Compose Files](https://docs.docker.com/compose/compose-file/). 
Please read the documentation to understand their main sections.

{{% notice warning %}}
Some containers and their parameters are required for Docksal to work properly. 
**Please see [Don't break your Docksal setup!](/stack/custom-configuration/#warning) section.**
{{% /notice %}}

You have to run `fin project start` (`fin p start` for short) to apply configuration changes.
If you remove services or volumes you have to remove them with `fin project rm [service]`.

## Project Configuration Files
### docksal.yml {#docksal-yml}

`docksal.yml` is a [Compose file](https://docs.docker.com/compose/compose-file/).
It's the main configuration file for a project and controls its the settings for each service. Use it to
modify settings that are needed for anyone that uses your project.

If you don't have this file in your project folder, fin will load the [default stack](#default-configurations), 
this way providing a zero-configuration setup.

For more details on its role, check [loading order](#loading-order).

### docksal.env {#docksal-env}

`docksal.env` is an [Environment file](https://docs.docker.com/compose/env-file/).

It is used to override of some of the default environment variables, without the need for
a full `docksal.yml` file (e.g., to override `MYSQL_ROOT_PASSWORD`) or to provide additional environment
variables for your automation scripts (see [custom commands](/fin/custom-commands/)).

### docksal-local.yml, docksal-local.env {#docksal-local}

`docksal-local.yml` and `docksal-local.env` are used for additional customizations that happen after the main files 
are loaded. See [loading order](#loading-order). A good example of their use is [exposing custom ports](/core/networking/#expose-port) 
or switching PHP versions.

These files are intended for local overrides. They should be added to `.gitignore` and never committed into a project 
repo. You can always include an example file in the repo, e.g., `example.docksal-local.env`, and instruct users to copy 
it and adjust as necessary.

## Default Stacks {#default-configurations}

Docksal ships with a set of default configurations (stacks), which are `yml` files stored in `$HOME/.docksal/stacks/`.<commit_msg>Fix typo in understanding-stack-config.md (#1318)<commit_after>---
title: "Understanding Stack Configurations"
weight: 1
aliases:
  - /en/master/advanced/stack-config/
---
1. [Basics](#basics)
2. [Project configuration files](#docksal-yml)
3. [Default stacks](#default-configurations)
4. [Configuration files loading order](#loading-order)

## Basics {#basics}

Docksal relies on [Docker Compose](https://docs.docker.com/compose/) to launch groups of related containers.
The yml files you use are [Compose Files](https://docs.docker.com/compose/compose-file/). 
Please read the documentation to understand their main sections.

{{% notice warning %}}
Some containers and their parameters are required for Docksal to work properly. 
**Please see [Don't break your Docksal setup!](/stack/custom-configuration/#warning) section.**
{{% /notice %}}

You have to run `fin project start` (`fin p start` for short) to apply configuration changes.
If you remove services or volumes you have to remove them with `fin project rm [service]`.

## Project Configuration Files
### docksal.yml {#docksal-yml}

`docksal.yml` is a [Compose file](https://docs.docker.com/compose/compose-file/).
It's the main configuration file for a project and controls the settings for each service. Use it to
modify settings that are needed for anyone that uses your project.

If you don't have this file in your project folder, fin will load the [default stack](#default-configurations), 
this way providing a zero-configuration setup.

For more details on its role, check [loading order](#loading-order).

### docksal.env {#docksal-env}

`docksal.env` is an [Environment file](https://docs.docker.com/compose/env-file/).

It is used to override of some of the default environment variables, without the need for
a full `docksal.yml` file (e.g., to override `MYSQL_ROOT_PASSWORD`) or to provide additional environment
variables for your automation scripts (see [custom commands](/fin/custom-commands/)).

### docksal-local.yml, docksal-local.env {#docksal-local}

`docksal-local.yml` and `docksal-local.env` are used for additional customizations that happen after the main files 
are loaded. See [loading order](#loading-order). A good example of their use is [exposing custom ports](/core/networking/#expose-port) 
or switching PHP versions.

These files are intended for local overrides. They should be added to `.gitignore` and never committed into a project 
repo. You can always include an example file in the repo, e.g., `example.docksal-local.env`, and instruct users to copy 
it and adjust as necessary.

## Default Stacks {#default-configurations}

Docksal ships with a set of default configurations (stacks), which are `yml` files stored in `$HOME/.docksal/stacks/`.
{'fraction_non_alphanumeric': 0.1076923076923077, 'fraction_numerical': 0.002564102564102564, 'mean_word_length': 4.730325288562434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5519285', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1534, 'n_words': 642}