Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,28 @@ $ msak-server
2024/01/04 17:41:01 INFO <latency1/latency1.go:286> Accepting UDP packets...
```

## Docker Compose

To run the published container image with Docker Compose, install
[Docker Compose V2](https://docs.docker.com/compose/install/) and then start the
service from this repository root:

```sh
$ docker compose up -d
```

The compose file starts `ghcr.io/fumons/msak-server:latest`, publishes the
throughput (`8080/tcp`), metrics (`9990/tcp`), and latency (`1053/udp`) ports,
and stores persistent state in the `msak-data` Docker volume. The server exposes
Prometheus-formatted metrics at `http://localhost:9990/metrics` and will be
restarted automatically if the container stops.

To stop the service and remove the container while keeping the data volume:

```sh
$ docker compose down
```

## Clients

To build the client and target the local server:
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.9"

services:
msak-server:
image: ghcr.io/fumons/msak-server:latest
ports:
- "8080:8080"
- "9990:9990"
- "1053:1053/udp"
volumes:
- msak-data:/msak/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "-", "http://localhost:9990/metrics"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s

volumes:
msak-data:
Loading