diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..f7376730 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +*Dockerfile* +*docker-compose* +node_modules +vendor \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..2c981bd7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM node:10-alpine + +ARG NODE_ENV=production +ENV NODE_ENV=$NODE_ENV \ + # https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#global-npm-dependencies + NPM_CONFIG_PREFIX=/home/node/.npm-global \ + PATH=$PATH:/home/node/.npm-global/bin + +RUN apk --update add git less openssh && \ + rm -rf /var/lib/apt/lists/* && \ + rm /var/cache/apk/* && \ + mkdir -p /home/node/workbench-client && \ + chown node:node /home/node/workbench-client + + + +USER node + +WORKDIR /home/node/workbench-client +COPY package.json package-lock.json* ./ +RUN npm i npm@latest -g && \ + npm install -g bower && \ + npm install --no-optional && \ + npm cache clean --force + +COPY . . + diff --git a/README.md b/README.md index 536cdd6e..7147fb2f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ baw-client ============ -The AngularJS client for the bioacoustic workbench +The AngularJS client for the acoustic workbench [![Build Status](https://travis-ci.org/QutBioacoustics/baw-client.png)](https://travis-ci.org/QutBioacoustics/baw-client) [![Dependency Status](https://gemnasium.com/QutBioacoustics/baw-client.png)](https://gemnasium.com/QutBioacoustics/baw-client) [![Code Quality](https://d3s6mut3hikguw.cloudfront.net/github/QutBioacoustics/baw-client.png)](https://codeclimate.com/github/QutBioacoustics/baw-client) [![Code Coverage](http://img.shields.io/codeclimate/coverage/github/QutBioacoustics/baw-client.svg)](https://codeclimate.com/github/QutBioacoustics/baw-client) --- @@ -11,7 +11,7 @@ The AngularJS client for the bioacoustic workbench Before you get started make sure you have at least version 4 or above of node.js. We also require `npm` version 3 or above. -To install project dependecies run: +To install project dependencies run: $ npm install diff --git a/build_and_push.ps1 b/build_and_push.ps1 new file mode 100644 index 00000000..5cfcbf5d --- /dev/null +++ b/build_and_push.ps1 @@ -0,0 +1,2 @@ +#!/bin/env pwsh + diff --git a/workbench-client.code-workspace b/workbench-client.code-workspace new file mode 100644 index 00000000..876a1499 --- /dev/null +++ b/workbench-client.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file