diff options
| author | Fuwn <[email protected]> | 2026-02-26 17:54:57 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 17:54:57 -0800 |
| commit | 6127f7af68c99541071dddcf35062559043786a7 (patch) | |
| tree | d4dd67b464849203ee7f89a6a11cbaac13503fbf | |
| parent | chore: add prometheus scrape configuration (diff) | |
| download | plutia-test-6127f7af68c99541071dddcf35062559043786a7.tar.xz plutia-test-6127f7af68c99541071dddcf35062559043786a7.zip | |
chore: update docker and compose development setup
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Dockerfile | 25 | ||||
| -rw-r--r-- | config.dev.yaml | 21 | ||||
| -rw-r--r-- | docker-compose.dev.yml | 7 | ||||
| -rw-r--r-- | docker-compose.yml | 6 |
5 files changed, 58 insertions, 3 deletions
@@ -8,3 +8,5 @@ scale-test-data-resolver-stateonly/ *.zst bench-*.out bench-*.time +prometheus-data +config.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..34d7185 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM golang:1.25-alpine AS builder + +WORKDIR /app + +ENV CGO_ENABLED=0 + +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . . + +RUN go build -trimpath -ldflags="-s -w" -o plutia ./cmd/plutia + +FROM gcr.io/distroless/base-debian12 + +WORKDIR /app + +USER 1000:1000 + +COPY --from=builder /app/plutia /app/plutia + +EXPOSE 8080 + +ENTRYPOINT ["/app/plutia"] diff --git a/config.dev.yaml b/config.dev.yaml new file mode 100644 index 0000000..5d552c6 --- /dev/null +++ b/config.dev.yaml @@ -0,0 +1,21 @@ +mode: mirror +data_dir: ./data +plc_source: https://plc.directory +verify: full +zstd_level: 9 +block_size_mb: 8 +checkpoint_interval: 500 +commit_batch_size: 128 +verify_workers: 10 +listen_addr: :8080 +mirror_private_key_path: ./mirror.key +poll_interval: 5s +request_timeout: 10s +http_retry_max_attempts: 8 +http_retry_base_delay: 250ms +http_retry_max_delay: 10s +rate_limit: + resolve_rps: 30 + resolve_burst: 60 + proof_rps: 10 + proof_burst: 20 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..8f3a93d --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,7 @@ +services: + plutia: + command: ["serve", "--config=/etc/plutia/config.yaml", "--max-ops=2000"] + build: . + image: plutia:local + volumes: + - ./config.dev.yaml:/etc/plutia/config.yaml:ro diff --git a/docker-compose.yml b/docker-compose.yml index 5009c56..5787c3c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: plutia: - image: ghcr.io/fuwn/plutia:0.1.0 - command: ["plutia", "serve", "--config=/etc/plutia/config.yaml"] + image: ghcr.io/fuwn/plutia:latest + command: ["serve", "--config=/etc/plutia/config.yaml"] user: "${PLUTIA_USER:-1000:1000}" init: true stop_signal: SIGTERM @@ -25,7 +25,7 @@ services: ports: - "8080:8080" volumes: - - ./config.default.yaml:/etc/plutia/config.yaml:ro + - ./config.yaml:/etc/plutia/config.yaml:ro - ./data:/var/lib/plutia healthcheck: test: ["CMD", "wget", "-q", "-O-", "http://127.0.0.1:8080/health"] |