diff --git a/packages/service/storage-server/Dockerfile b/packages/service/storage-server/Dockerfile index a671732bb..484b9c368 100644 --- a/packages/service/storage-server/Dockerfile +++ b/packages/service/storage-server/Dockerfile @@ -1,8 +1,8 @@ -FROM node:18-alpine +ARG NODE_VERSION=18 -LABEL maintainer="S. Ali Mihandoost " +FROM node:${NODE_VERSION}-alpine -ENV NODE_ENV production +LABEL maintainer="S. Ali Mihandoost " WORKDIR /app @@ -11,9 +11,15 @@ WORKDIR /app COPY package.json ./ -RUN yarn install --frozen-lockfile --production=true --non-interactive +RUN yarn install --frozen-lockfile --non-interactive -COPY dist . +COPY . . + +RUN yarn build + +ENV PORT 80 +ENV TOKEN ${STORAGE_TOKEN} +ENV NODE_ENV production EXPOSE 80 diff --git a/packages/service/storage-server/src/lib/config.ts b/packages/service/storage-server/src/lib/config.ts index 3474bfaed..9a1d535a5 100644 --- a/packages/service/storage-server/src/lib/config.ts +++ b/packages/service/storage-server/src/lib/config.ts @@ -1,6 +1,6 @@ import {createLogger} from '@alwatr/logger'; -export const logger = createLogger('service-storage'); +export const logger = createLogger('storage-server'); export const config = { host: process.env.HOST ?? '0.0.0.0',