# Container settings

Source: https://laraport.app/docs/container-settings/

> Give containers display names, mark favourites, hide them and set the Laravel root. Settings are bound to the service, so they survive redeploys.

Press `e` on a container in the list to give it a display name, mark it as a favourite, hide it or set its Laravel root. The settings are written to the server's `containers` in the config.

## What a setting is bound to

Container names change on every redeploy with Swarm, Dokploy, Coolify and scaled Compose services. So a setting is bound to something more stable:

- `service: "swarm/<service>"` for a Swarm service, Dokploy apps included;
- `service: "coolify/<resource uuid>/<service>"` for a Coolify resource (its container name carries the time of the deploy);
- `service: "compose/<project>/<service>"` for a Compose service;
- `name:` for an exact container name or a glob pattern such as `shop-worker-*`.

The editor's **Applies to** field chooses between them; for Swarm, Coolify and Compose containers the service is the default. When several entries match a container, a service entry wins, then an exact name, then the first matching pattern.

To remove entries whose containers no longer exist, open the command palette (`ctrl+k`) on the container list and choose **Clean up container settings**. It lists them and asks first; patterns are kept.

## Fields

| Field | Description |
|---|---|
| `service` | `swarm/<service>` or `compose/<project>/<service>` |
| `name` | Container name or glob pattern |
| `display_name` | Name shown in the list |
| `group` | Group in the list. Default: the Coolify project, Swarm stack, Dokploy project or Compose project |
| `favorite` | Pinned to the top with a star |
| `hidden` | Hidden from the list. `.` shows hidden containers, `e` unhides one |
| `root_path` | The Laravel root in the container. Detected from `/var/www/html` and `/app` when not set |
| `custom_logs` | Extra log files listed under Service logs |
| `commands` | Command groups for this container, shown before the global ones |

```yaml
containers:
  - service: "swarm/shop-web-x7k2p"
    display_name: "Shop · web"
    favorite: true
    root_path: "/var/www/html"
    custom_logs:
      - /var/log/nginx/error.log
    commands:
      - name: "Shop"
        commands:
          - label: "sync prices"
            cmd: "php artisan shop:sync-prices"
```
