feat(config): integrate etcd for service discovery and config management
- Add etcd-client dependency for distributed configuration storage - Implement EtcdConfig with priority: etcd > environment variables > defaults - Add ServiceRegistry for service registration with lease keep-alive - Integrate etcd-based service discovery for appks gRPC connections - Add service watcher for real-time service instance updates - Migrate Redis configuration from single URL to cluster node list - Update Dockerfile with default IMKS_HOST and IMKS_PORT environment variables - Add etcd bootstrap configuration through environment variables - Implement Redis cluster URL building with optional authentication
This commit is contained in:
+3
-2
@@ -18,7 +18,6 @@ RUN cargo build --release --bin imks && \
|
||||
strip target/release/imks
|
||||
|
||||
FROM ubuntu:26.04
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ca-certificates curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@@ -27,10 +26,12 @@ COPY --from=builder /app/target/release/imks /usr/local/bin/imks
|
||||
COPY --from=builder /app/migrate/ /app/migrate/
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN useradd -m -u 1000 imks && chown -R imks:imks /app
|
||||
USER imks
|
||||
|
||||
ENV IMKS_HOST=0.0.0.0
|
||||
ENV IMKS_PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=15s --timeout=3s --start-period=10s --retries=3 \
|
||||
|
||||
Reference in New Issue
Block a user