Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM amazonlinux:2023 AS base
ENV NODE_VERSION=24.4.0

RUN yum update -y && \
yum install -y tar xz openssl && \
yum install -y tar xz openssl curl-minimal && \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to double check me on this, but I believe the amazonlinux:2023 image contains curl already.

ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then NODE_ARCH="x64"; \
elif [ "$ARCH" = "aarch64" ]; then NODE_ARCH="arm64"; \
Expand All @@ -21,18 +21,6 @@ ARG NEPTUNE_NOTEBOOK
ENV NEPTUNE_NOTEBOOK=$NEPTUNE_NOTEBOOK
ENV HOME=/graph-explorer

# Conditionally set the following environment values using +/- variable expansion
# https://docs.docker.com/reference/dockerfile/#environment-replacement
#
# If NEPTUNE_NOTEBOOK value is set then
# - GRAPH_EXP_ENV_ROOT_FOLDER = /proxy/9250/explorer
# - PROXY_SERVER_HTTP_PORT = 9250
# - LOG_STYLE = cloudwatch
# Else the values are the defaults
# - GRAPH_EXP_ENV_ROOT_FOLDER = /explorer
# - PROXY_SERVER_HTTP_PORT = 80
# - LOG_STYLE = default

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove the documentation

ENV GRAPH_EXP_ENV_ROOT_FOLDER=${NEPTUNE_NOTEBOOK:+/proxy/9250/explorer}
ENV GRAPH_EXP_ENV_ROOT_FOLDER=${GRAPH_EXP_ENV_ROOT_FOLDER:-/explorer}

Expand All @@ -57,4 +45,8 @@ RUN pnpm install && \
EXPOSE 443
EXPOSE 80
EXPOSE 9250

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:${PROXY_SERVER_HTTP_PORT}/ || exit 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /status endpoint is what we should hit to test the server is up.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it seems the server url may be a complicated endeavor. We have multiple possible endpoints:

Config URL
HTTP http://localhost:${PROXY_SERVER_HTTP_PORT}/status
HTTPS https://localhost:${PROXY_SERVER_HTTPS_PORT}/status
Neptune Notebook http://localhost:9250/status


ENTRYPOINT ["./docker-entrypoint.sh"]