From e69ef6df8832a0298c320e14e081db16c32c44b3 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Sun, 29 Dec 2019 10:32:25 -0600 Subject: [PATCH] Adding initial Docker setup files --- .dockerignore | 1 + Dockerfile | 6 ++++++ README.md | 2 +- entrypoint.sh | 10 ++++++++++ pipeline.yml | 5 ++++- 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 entrypoint.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b497360 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +data/config.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff354d8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM node:12-14-stretch +COPY . /opt/baphomet +RUN npm install +WORKDIR /opt/baphomet +ENTRYPOINT entrypoint.sh +CMD run \ No newline at end of file diff --git a/README.md b/README.md index 1449c32..922c204 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Copy data/config.json.example to data/config.json and replace the relevent confi ```bash npm install -node run index.js +node index.js ``` ## Development diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..02827e1 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env sh + +case $1 in +run) + node index.js + ;; +*) + echo "\"$1\" is an unrecognized command" + ;; +esac \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 38db176..4b1b026 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -7,6 +7,9 @@ resources: uri: ssh://git@git.nulloctet.com:8437/warricksothr/baphomet-js.git private_key: | ((pull_key)) + branch: + - master + - develop jobs: - name: test @@ -19,7 +22,7 @@ jobs: platform: linux image_resource: type: registry-image - source: { repository: node, tag: "13" } + source: { repository: node, tag: "12-14-stretch" } inputs: - name: baphomet-js-git run: