> For the complete documentation index, see [llms.txt](https://httpstubhq.gitbook.io/httpstub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://httpstubhq.gitbook.io/httpstub/docker-compose.md).

# Docker compose

```
version: '3'
services:
  httpstub:
    image: ghcr.io/gleb619/httpstub:master
    ports:
      - "9080:9080"
    environment:
      - SERVER_PORT=9080
      - STUB_DATA=data
      - WATCH_INTERVAL=3
      - WATCH_ENABLED=true
    volumes:
      - ./stubs:/app/data
```

Execute next commands

```
mkdir -p stubs
cat <<EOT >> stubs/hello.world.yaml
version: v1.1
rules:
  - request:
      path: /api/greetings
    response:
      status: 200
      headers:
        content-type: application/json
      body: |
        {
          "message": "Hello World!"
        }
EOT
docker-compose up -d
```

Once the project is up, you can open <http://localhost:9080/api/greetings> and see the result
