diff --git a/Dockerfile b/Dockerfile index 276b4c9af08efa01c92b94a3f7d98421eff7324a..7e63d32339b18b5618bd99dd676a743db25f9a8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM node:14.15.1-alpine ARG API_URL -ARG GOOGLE_APPLICATION_CREDENTIALS -ARG SHEETS_API_SHEET_ID # Create app directory RUN mkdir /opt/app && chown node:node /opt/app @@ -23,19 +21,12 @@ COPY babel.config.js ./ # Bundle app source COPY src ./src -# If translations are fetched from Google Sheets API, -# the 'node' user needs to be able to write into this folder -RUN chown -R node:node ./src/client/translations - # https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user USER node # Run the scripts defined in package.json RUN npm install && \ - API_URL=$API_URL \ - GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS \ - SHEETS_API_SHEET_ID=$SHEETS_API_SHEET_ID \ - npm run build +API_URL=$API_URL npm run build EXPOSE 3001