# Configure Environment, Compose File and Resources

> Update environment variables, edit the Compose file, and adjust CPU and memory limits for your Docker Compose App, then deploy your changes.

Source: https://flywp.com/docs/site/docker-compose-apps/configure/

The **Configurations** section in your app's menu includes three pages: **Environment**, **Compose file** and **Resources**. Changes made on any of these pages don't take effect until you deploy them.

## Environment

The **Environment** page lists the variables of your app, with a **Name** and a **Value** for each. Variables of the app apply to every service. Variables of a service apply only to that service. Use **Variables for** to switch between the app and a service. A service variable wins over an app variable with the same name, and both win over the Compose file.

1. Open your app and navigate to **Configurations** → **Environment**.
2. Click **Add Variable**, or open the menu of a row and click **Edit**.
3. Click **Apply** in the footer. The footer shows how many changes aren't applied yet.

![The Environment page with the variable list, a hidden secret variable, and the Apply and Discard footer under a change not yet applied](https://flywp.com/wp-content/uploads/2026/11/compose-configure-environment.png)

New and changed variables carry a badge (**New**, **Changed** or **Removed at Apply**) until you apply them. **Apply** restarts the services that the changes are for. If the app is stopped, the button reads **Apply and Start**. Click **Discard** to drop all the changes you haven't applied.

Turn on **Secret** for any variable to hide its value on screen. Click **Reveal** to view it. FlyWP asks you to confirm your password, and the values hide again after a short time, or when you click **Hide now**. Secret values are never shown in version comparisons.

The page also alerts you to:

- **Used in the compose file but not set**: Variables your Compose file reads that have no value yet. Click one to add it.
- **No service ... in the running version. These variables are unused.**: Variables of a service that the running version no longer has.

Open the menu of a row for more actions. **Undo** drops a change you haven't applied. **Delete** removes the variable. If you delete a changed variable, the new value is lost, and the app keeps the variable until the next apply.

To set many variables at once, click **Import** and paste the contents of a `.env` file. Review what each line does before you import. Click **Export** to save a copy of your variables.

:::note
If the last apply fails, the page says "Last apply failed. The app runs with the previous values." Click **Go Back** to return to the values the app runs with, or **Apply Again** to retry.
:::

## Compose file

The **Compose file** page displays your currently deployed configuration alongside an editor for your next changes.

1. Open your app and navigate to **Configurations** → **Compose file**.
2. Edit the file in the editor.
3. Click **Check File**. FlyWP also checks the file as you type and highlights any issues by line and service name.
4. Click **Deploy** once your file passes validation.

![The Compose file page with its editor and the Check File button](https://flywp.com/wp-content/uploads/2026/11/compose-configure-compose-file.png)

Nothing changes on your server until you trigger a deploy, and FlyWP won't let you deploy a file that fails validation. For a breakdown of validation requirements, see [Compose file rules](https://flywp.com/docs/site/docker-compose-apps/compose-file-rules/).

If you created your app from a GitHub repository, this page displays the connected repository, branch, and Compose file path. FlyWP pulls the file directly from this branch on every deploy.

## Resources

The **Resources** page allows you to customize CPU and memory limits for each service.

1. Open your app and navigate to **Configurations** → **Resources**.
2. Adjust **CPU (cores)**, **Memory (MB)** or **Processes** for any service.
3. Click **Save Limits**, then **Save and Restart**.

![The limits table with memory, CPU and processes for each service and the Save Limits button](https://flywp.com/wp-content/uploads/2026/11/compose-configure-resources.png)

The top of the card shows the memory of your server and how much is free for apps. Under each memory limit, **In the file** shows what your Compose file asks for. FlyWP overrides any limits defined inside your Compose file with these settings, so a limit is always applied.

Saving restarts only the services whose limits you changed. The confirmation lists them, and the other services keep running. If a service uses more memory than its new limit, the page warns "Uses N MB now: it can run out of memory." Above the card, tiles and a chart show the current use of your app.

You can't change limits while a deploy or another action runs on the app.
