Skip to content

Docker

Docker is the recommended way to keep Spigot Sales Webhook running on a server.

The bundled docker-compose.yml builds the image and mounts the important files:

docker-compose.yml
services:
spigot-sales-webhook:
build: .
container_name: spigot-sales-webhook
restart: unless-stopped
volumes:
- ./src/main/resources/config.yml:/opt/spigot-sales-webhook/config.yml:ro
- ./data:/opt/spigot-sales-webhook/data

The config is mounted read-only, while data is writable so the state file survives rebuilds and restarts.

Create and fill src/main/resources/config.yml, then run:

Terminal window
docker compose up -d --build

Docker builds the Java distribution in a JDK image, copies it into a smaller JRE image, and runs it as the spigotsales user.

Terminal window
docker compose logs -f spigot-sales-webhook

Watch for:

  • config loading errors
  • failed SpigotMC buyer page requests
  • Discord webhook HTTP errors
  • “No new sales found” scan results
  • “Sent X new sales to Discord” success messages
Terminal window
docker compose down

This stops the container but keeps ./data.

With the default config:

scan:
state-file: "data/seen-sales.json"

Inside Docker, that resolves to:

/opt/spigot-sales-webhook/data/seen-sales.json

Because ./data is mounted into /opt/spigot-sales-webhook/data, the state file remains on the host machine.

To rebuild after pulling new source changes:

Terminal window
docker compose up -d --build

The image does not copy your real config into the final image. Private values stay in your local mounted config.yml.