From 057cccbe8d96bfd98fbe368168316a4c49631556 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Wed, 5 Feb 2020 15:36:21 +0200 Subject: [PATCH] Simplify dockerfile hsl-forked deps are directly listed as github repos in package.json. No need to install and link manually. --- Dockerfile | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 915d2bf1..f3084935 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,39 +18,18 @@ RUN git clone --single-branch https://github.com/vesameskanen/libpostal \ && make install \ && ldconfig -# use our extended query module -ENV QUERY=/opt/pelias/query -WORKDIR ${QUERY} -RUN git clone --single-branch https://github.com/HSLdevcom/query.git \ - && cd query \ - && npm install \ - && npm link - -# use our text-analyzer -ENV TEXT_ANALYZER=/opt/pelias/text-analyzer -WORKDIR ${TEXT_ANALYZER} -RUN git clone --single-branch https://github.com/HSLdevcom/pelias-text-analyzer.git \ - && cd pelias-text-analyzer \ - && npm install \ - && npm link - # Where the app is built and run inside the docker fs ENV WORK=/opt/pelias/api -# Used indirectly for saving npm logs etc. +# Used indirectly for saving yarn logs etc. ENV HOME=/opt/pelias/api WORKDIR ${WORK} ADD . ${WORK} # Build and set permissions for arbitrary non-root user -RUN npm install \ - && npm link pelias-query \ - && npm link pelias-text-analyzer \ - && chmod -R a+rwX . +RUN yarn install && chmod -R a+rwX . ADD pelias.json.docker pelias.json -ADD run.sh /usr/local/bin/ - -CMD /usr/local/bin/run.sh +CMD yarn start