Skip to content

Commit

Permalink
Merge pull request #68 from HSLdevcom/update-deps
Browse files Browse the repository at this point in the history
Update dependencies, simplify dockerfile
  • Loading branch information
optionsome authored Feb 6, 2020
2 parents 822358d + 057cccb commit 758f1f8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 56 deletions.
29 changes: 4 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8-jessie
FROM node:10.18-buster

ENV PORT=8080
EXPOSE ${PORT}
Expand All @@ -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
16 changes: 0 additions & 16 deletions build-docker-image.sh

This file was deleted.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,52 +33,53 @@
"url": "https://github.com/pelias/api/issues"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
},
"dependencies": {
"@mapbox/geojson-extent": "^0.3.1",
"addressit": "1.6.0",
"async": "^2.0.0",
"async": "^3.0.1",
"check-types": "^7.0.0",
"elasticsearch": "^15.0.0",
"async": "^3.0.1",
"elasticsearch": "^16.0.0",
"express": "^4.8.8",
"geojson": "^0.5.0",
"geolib": "^2.0.18",
"iso3166-1": "^0.4.2",
"geolib": "^3.0.0",
"iso-639-3": "^1.0.0",
"iso3166-1": "^0.4.2",
"joi": "^14.0.0",
"locale": "^0.1.0",
"lodash": "^4.17.4",
"markdown": "^0.5.0",
"morgan": "^1.8.2",
"pelias-categories": "^1.2.0",
"pelias-config": "^3.8.0",
"pelias-config": "^4.5.0",
"pelias-labels": "^1.8.0",
"pelias-logger": "^1.2.0",
"pelias-microservice-wrapper": "^1.7.0",
"pelias-model": "^5.5.2",
"pelias-query": "^9.7.0",
"pelias-model": "^7.0.0",
"pelias-parser": "1.38.0",
"pelias-query": "github:hsldevcom/query",
"pelias-sorting": "^1.2.0",
"predicates": "^2.0.0",
"regenerate": "^1.4.0",
"retry": "^0.12.0",
"stable": "^0.1.8",
"stats-lite": "^2.0.4",
"pelias-text-analyzer": "github:hsldevcom/pelias-text-analyzer",
"through2": "^3.0.0",
"pelias-text-analyzer": "1.9.1",
"fuzzy.js": "^0.1.0"
},
"devDependencies": {
"ciao": "^2.0.0",
"difflet": "^1.0.1",
"istanbul": "^0.4.2",
"jshint": "^2.5.6",
"jshint": "^2.10.1",
"pelias-mock-logger": "^1.3.0",
"precommit-hook": "^3.0.0",
"proxyquire": "^2.0.0",
"source-map": "^0.7.0",
"tap-dot": "^2.0.0",
"tape": "^4.5.1",
"tmp": "^0.0.33"
"tape": "^4.5.1"
},
"pre-commit": [
"lint"
Expand Down
2 changes: 1 addition & 1 deletion pelias.json.docker
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"esclient": {
"apiVersion": "2.4",
"apiVersion": "6.8",
"keepAlive": true,
"requestTimeout": "20000",
"hosts": [
Expand Down
1 change: 0 additions & 1 deletion sanitizer/_text_addressit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const addressit = require('addressit');
const _ = require('lodash');
const logger = require('pelias-logger').get('api');
var check = require('check-types');
var extend = require('extend');
var normalize = require('../helper/stringUtils').normalize;
var api = require('pelias-config').generate().api;

Expand Down

0 comments on commit 758f1f8

Please sign in to comment.