Skip to content

Commit

Permalink
Merge pull request #399 from pelias/fix-metadata-download-quick
Browse files Browse the repository at this point in the history
Support metadata download durng `npm install`
  • Loading branch information
orangejulius authored Sep 28, 2021
2 parents 7f2362f + 7effacd commit 185b972
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ RUN apt-get update && apt-get install -y bzip2 unzip && rm -rf /var/lib/apt/list
ENV WORKDIR=/code/pelias/geonames
WORKDIR $WORKDIR

# copy files needed to update metadata, as it's called with NPM install
COPY ./bin/updateMetadata.js $WORKDIR/bin/updateMetadata.js
COPY ./lib/tasks/meta.js ./lib/tasks/metafiles.json $WORKDIR/lib/tasks/

# copy package.json first to prevent npm install being rerun when only code changes
COPY ./package.json ${WORKDIR}
RUN npm install --ignore-scripts
RUN npm install

# Copy code into image
ADD . $WORKDIR

# Explicitly download metadata (it will not be downloaded automatically in noninteractive sessions)
RUN npm run download_metadata

# run tests
RUN npm test

Expand Down

0 comments on commit 185b972

Please sign in to comment.