Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
*Dockerfile*
*docker-compose*
node_modules
npm-debug.log
wwwroot/config.json
20 changes: 12 additions & 8 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Docker image for the primary terria map application server
FROM node:8
FROM osgeo/gdal:alpine-small-3.1.0 as build

RUN apt-get update && apt-get install -y gdal-bin
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh npm
RUN mkdir -p /etc/config/client
WORKDIR /usr/src/app

RUN mkdir -p /usr/src/app && mkdir -p /etc/config/client
WORKDIR /usr/src/app/component
COPY . /usr/src/app
RUN rm wwwroot/config.json && ln -s /etc/config/client/config.json wwwroot/config.json
COPY ./package.json ./
RUN npm install

EXPOSE 3001
Comment thread
davidedelerma marked this conversation as resolved.
COPY . .

RUN npm run gulp

RUN ln -s /etc/config/client/config.json wwwroot/config.json

CMD [ "node", "./node_modules/terriajs-server/lib/app.js", "--config-file", "devserverconfig.json" ]
Comment thread
davidedelerma marked this conversation as resolved.
8 changes: 8 additions & 0 deletions deploy/docker/readme_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
To run the docker image:

`docker run --rm -it -p <port>:<port>/tcp -v <host absolute path to confing.json>:/etc/config/client/config.json <image name>:<TAG>`

Command to execute to launch Terria:

`node ./node_modules/terriajs-server/lib/app.js --port <port>`

1 change: 0 additions & 1 deletion wwwroot/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
// Enable experimental features, since its nice to have the bleeding edge.
// Disable it if things go wrong with the experimental features or your users aren't robust to features which might change or disapear completly.
"experimentalFeatures": true,

// To override TerriaJS's region mapping file with a local one.
// regionMappingDefinitionsUrl: "data/regionMapping.json"

Expand Down
Loading