Skip to content

Commit

Permalink
docker: add docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Apr 30, 2019
1 parent ce0b1fe commit a7e459e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules
package-lock.json

# ignore all of whosonfirst/dictionaries
resources/whosonfirst/dictionaries/*/*.txt

# whitelist certain files
!resources/whosonfirst/dictionaries/country/wof:country.txt
!resources/whosonfirst/dictionaries/country/wof:shortcode.txt
!resources/whosonfirst/dictionaries/country/name:eng_x_preferred.txt
!resources/whosonfirst/dictionaries/dependency/wof:shortcode.txt
!resources/whosonfirst/dictionaries/dependency/name:eng_x_preferred.txt
!resources/whosonfirst/dictionaries/region/wof:shortcode.txt
!resources/whosonfirst/dictionaries/region/name:eng_x_preferred.txt
!resources/whosonfirst/dictionaries/region/abrv:eng_x_preferred.txt
!resources/whosonfirst/dictionaries/locality/name:eng_x_preferred.txt
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# base image
FROM pelias/baseimage

# change working dir
ENV WORKDIR /code/pelias/parser
WORKDIR ${WORKDIR}

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

# copy code from local checkout
ADD . ${WORKDIR}

USER pelias

CMD [ "node", "./server/http.js" ]
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '2'
services:
parser:
image: mapzen/pelias-parser
build: .
restart: always
environment: [ "PORT=3000" ]
ports: [ "6800:3000" ]

0 comments on commit a7e459e

Please sign in to comment.