You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
930 B
36 lines
930 B
# Final stage
|
|
FROM alpine:latest
|
|
|
|
# Install dependencies including Go for the entrypoint script
|
|
RUN apk --no-cache add curl ca-certificates go
|
|
|
|
WORKDIR /root/
|
|
|
|
# Copy gRPC admin files
|
|
COPY ./docker/admin_integration/admin-grpc-entrypoint.sh /entrypoint.sh
|
|
COPY ./docker/admin_integration/admin_grpc_server.go /admin_grpc_server.go
|
|
COPY ./weed/pb/worker.proto /worker.proto
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Create directories
|
|
RUN mkdir -p /data /config /work
|
|
|
|
# Expose admin ports (HTTP and gRPC)
|
|
EXPOSE 9900 9901
|
|
|
|
# Set environment variables
|
|
ENV MASTER_ADDRESS="master:9333"
|
|
ENV ADMIN_PORT="9900"
|
|
ENV GRPC_PORT="9901"
|
|
ENV SCAN_INTERVAL="30s"
|
|
ENV WORKER_TIMEOUT="5m"
|
|
ENV TASK_TIMEOUT="30m"
|
|
ENV MAX_RETRIES="3"
|
|
ENV MAX_CONCURRENT_TASKS="5"
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 \
|
|
CMD curl -f http://localhost:9900/health || exit 1
|
|
|
|
# Start admin server
|
|
ENTRYPOINT ["/entrypoint.sh"]
|