# edge-port-host-bound

Generated from the code · as of CLI 0.6.0

The CLI prints, for example:

```text
the edge routes to `web` port 3000, which compose publishes only on host address `127.0.0.1`, where the edge cannot reach it. Write `ports: ["3000:3000"]`
```

Fix it in: `docker-compose.yml`.

## Keys that raise it

- [`edge`](https://docs.omniarc.eu/reference/arc-yaml/edge.md)
- [`edge.port`](https://docs.omniarc.eu/reference/arc-yaml/edge.md#edge-port)

**Example: shop/docker-compose.yml**

```yaml
# A small shop: Postgres holds the products, customers and orders, and
# PostgREST serves them as a JSON API on port 3000.
services:
  web:
    image: postgrest/postgrest:v12.2.12
    environment:
      PGRST_DB_URI: postgres://shop:${POSTGRES_PASSWORD:-shop}@db:5432/shop
      PGRST_DB_SCHEMAS: public
      PGRST_DB_ANON_ROLE: web_anon
      PGRST_SERVER_PORT: 3000
    ports: ["3000:3000"]
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:17
    environment:
      POSTGRES_USER: shop
      POSTGRES_DB: shop
      # Set a real one with `omniarc env set POSTGRES_PASSWORD`, which asks for it.
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-shop}
    volumes:
      - db-data:/var/lib/postgresql/data
      - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U shop -d shop"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  db-data:
```
