diff --git a/Dockerfile b/Dockerfile index b1af91b..e02bc3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,9 @@ FROM python:3.12-slim-bookworm COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ FROM node:22-alpine -RUN npm config set registry https://registry.npmmirror.com + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh WORKDIR /app @@ -15,4 +17,5 @@ RUN pnpm build EXPOSE 3000 +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["pnpm", "start"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..8aa2921 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh +NPM_REGISTRY=${NPM_REGISTRY:-https://registry.npmjs.org/} +echo "Setting npm registry to ${NPM_REGISTRY}" +npm config set registry "$NPM_REGISTRY" + +exec "$@"