# Useful commands

## How to know which service is running in which port?&#x20;

```
docker ps --format "table {{.Names}}\t{{.Ports}}\t{{.Image}}"
```

***

## Stop running any Service After some modifications

If you want to apply changes made to your some file, follow these steps:

#### 1. Navigate to your Service directory

```bash
cd ~/AppFlowy-Cloud
```

2. Stop running containers

```
docker compose down
```

3. Edit your files

```
vim .env
```

4. Rebuild and restart the containers

```
docker compose up -d --build
```

***

## Restarting services

Instead of stoping the service you can just restart the service

```
docker compose restart <service_name>
```
