diff --git a/Dockerfile b/Dockerfile index 3ec2186a3..619a826d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,9 @@ FROM amazonlinux:2023 AS base ENV NODE_VERSION=24.4.0 RUN yum update -y && \ - yum install -y tar xz openssl && \ + # Amazon Linux 2023 base image is minimal and does not include curl by default, + # so we explicitly install curl here to ensure availability. + yum install -y tar xz openssl curl && \ ARCH=$(uname -m) && \ if [ "$ARCH" = "x86_64" ]; then NODE_ARCH="x64"; \ elif [ "$ARCH" = "aarch64" ]; then NODE_ARCH="arm64"; \ @@ -38,6 +40,7 @@ ENV GRAPH_EXP_ENV_ROOT_FOLDER=${GRAPH_EXP_ENV_ROOT_FOLDER:-/explorer} ENV PROXY_SERVER_HTTP_PORT=${NEPTUNE_NOTEBOOK:+9250} ENV PROXY_SERVER_HTTP_PORT=${PROXY_SERVER_HTTP_PORT:-80} +ENV PROXY_SERVER_HTTPS_PORT=443 ENV LOG_STYLE=${NEPTUNE_NOTEBOOK:+cloudwatch} ENV LOG_STYLE=${LOG_STYLE:-default} @@ -54,7 +57,12 @@ RUN pnpm install && \ chmod a+x ./process-environment.sh && \ chmod a+x ./docker-entrypoint.sh +# Expose ports for HTTP, HTTPS, and Neptune Notebook proxy EXPOSE 443 EXPOSE 80 EXPOSE 9250 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ + CMD curl -fsSL "http://localhost:${PROXY_SERVER_HTTP_PORT}/status" || exit 1 + ENTRYPOINT ["./docker-entrypoint.sh"]