From f785a320d7b3b2f3b8d3d79613fe55d93e2e44d7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 28 Nov 2022 15:19:00 -0800 Subject: use docker build args --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index e0e0673f..7f414172 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ FROM node:18-alpine ARG NODE_ENV=production +ARG URL +ARG BTC +ARG SOCKET + ENV NODE_ENV $NODE_ENV +ENV PUBLIC_COINOS_URL $URL +ENV PUBLIC_BTC $BTC +ENV PUBLIC_SOCKET $SOCKET RUN npm i -g pnpm WORKDIR /app @@ -10,6 +17,6 @@ ADD package.json . RUN --mount=type=cache,target=/root/.local/share/pnpm/store NODE_ENV=development pnpm i COPY . . -RUN PUBLIC_COINOS_URL="https://coinos.io/api" pnpm build +RUN pnpm build CMD ["node", "build"] -- cgit v1.2.3