- Introduce `docker-compose.fleet-host.yml` allowing Elastic Agent to connect to a host-installed Fleet Server. - Add `pingRoute` to provide a simple `/ping` endpoint returning "pong" with a timestamp.
18 lines
870 B
YAML
18 lines
870 B
YAML
services:
|
|
# Do not start the in-container Fleet Server when using a host-installed Fleet Server
|
|
fleet-server:
|
|
profiles: [disabled]
|
|
|
|
# Point the Elastic Agent container to the host Fleet Server
|
|
elastic-agent:
|
|
environment:
|
|
- FLEET_URL=http://host.docker.internal:8220
|
|
# No change to 8200: APM intake stays exposed from this container
|
|
|
|
## Usage (Windows + WSL host Fleet Server):
|
|
## 1) Stop containerized Fleet services to free port 8220:
|
|
## docker compose stop fleet-server elastic-agent
|
|
## 2) Install Fleet Server on WSL (see commands I provided), verify http://localhost:8220/api/status
|
|
## 3) Start Elastic Agent pointing to host Fleet:
|
|
## docker compose -f docker-compose.yml -f docker-compose.fleet-host.yml up -d elastic-agent
|
|
## 4) Verify in Kibana → Fleet → Agents: Fleet Server (host) healthy; Elastic Agent (container) healthy. |