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:
zhenyi
2026-06-11 22:50:38 +08:00
parent e72866db8d
commit c794b818ff
24 changed files with 984 additions and 952 deletions
+2 -2
View File
@@ -30,9 +30,9 @@ RUN useradd -m -u 1000 imks && chown -R imks:imks /app
USER imks
ENV IMKS_HOST=0.0.0.0
ENV IMKS_PORT=3000
ENV IMKS_PORT=50048
EXPOSE 3000
EXPOSE 50048
HEALTHCHECK --interval=15s --timeout=3s --start-period=10s --retries=3 \
CMD curl -sf http://localhost:3000/health || exit 1