refactor: remove obsolete config and update documentation
- Remove config.example.conf (replaced by config.example.yml) - Update Dockerfile to use YAML config - Update README.md with YAML configuration examples - Remove old directive-based config documentation - Update package paths (DEB and RPM) in README Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -54,7 +54,7 @@ FROM gcr.io/distroless/base-debian12 AS runtime
|
||||
COPY --from=builder /usr/bin/logcorrelator /usr/bin/logcorrelator
|
||||
|
||||
# Copy example config
|
||||
COPY --from=builder /build/config.example.conf /etc/logcorrelator/logcorrelator.conf
|
||||
COPY --from=builder /build/config.example.yml /etc/logcorrelator/logcorrelator.yml
|
||||
|
||||
# Create necessary directories in builder stage (distroless has no shell)
|
||||
COPY --from=builder /tmp/runtime-root/var /var
|
||||
@ -65,7 +65,7 @@ COPY --from=builder /tmp/runtime-root/etc /etc
|
||||
|
||||
# Set entrypoint
|
||||
ENTRYPOINT ["/usr/bin/logcorrelator"]
|
||||
CMD ["-config", "/etc/logcorrelator/logcorrelator.conf"]
|
||||
CMD ["-config", "/etc/logcorrelator/logcorrelator.yml"]
|
||||
|
||||
# =============================================================================
|
||||
# RPM build stage - create .rpm package entirely in Docker
|
||||
@ -84,7 +84,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
COPY --from=builder /usr/bin/logcorrelator /tmp/pkgroot/usr/bin/logcorrelator
|
||||
|
||||
# Copy config and systemd unit
|
||||
COPY --from=builder /build/config.example.conf /tmp/pkgroot/etc/logcorrelator/logcorrelator.conf
|
||||
COPY --from=builder /build/config.example.yml /tmp/pkgroot/etc/logcorrelator/logcorrelator.yml
|
||||
COPY logcorrelator.service /tmp/pkgroot/etc/systemd/system/logcorrelator.service
|
||||
|
||||
# Create directory structure and set permissions
|
||||
@ -106,7 +106,7 @@ RUN fpm -s dir -t rpm \
|
||||
--vendor "logcorrelator" \
|
||||
-p /tmp/logcorrelator-${VERSION}.rpm \
|
||||
usr/bin/logcorrelator \
|
||||
etc/logcorrelator/logcorrelator.conf \
|
||||
etc/logcorrelator/logcorrelator.yml \
|
||||
etc/systemd/system/logcorrelator.service \
|
||||
var/log/logcorrelator \
|
||||
var/run/logcorrelator
|
||||
@ -147,4 +147,4 @@ RUN go mod download || true
|
||||
COPY . .
|
||||
|
||||
# Default command: run with example config
|
||||
CMD ["go", "run", "./cmd/logcorrelator", "-config", "config.example.conf"]
|
||||
CMD ["go", "run", "./cmd/logcorrelator", "-config", "config.example.yml"]
|
||||
|
||||
Reference in New Issue
Block a user