Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
🐳 Add config copying to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidahouse committed Oct 27, 2019
1 parent c68ec41 commit f33332e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
6 changes: 6 additions & 0 deletions .ubolt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docker-build:
command: docker build -t docker-worker .
description: Build the docker container
docker-build-for-test:
command: docker build --build-arg configPath=../stampede-server-test/config -t docker-worker .
description: Build the docker container and supply config from server tests
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
ARG config
# Dockerfile

# arguments
ARG configPath
# node image
FROM node:8
WORKDIR /usr/src/app
# working folder
WORKDIR /var/stampede
# install app dependencies
COPY package*.json ./
RUN npm install
# copy the app into the container
COPY . .
COPY $config /user/src/app/.stampederc
CMD [ "npm", "start" ]
COPY $configPath ./config
# setup the environment variables
ENV stampede_stampedeConfigPath /var/stampede/config
# run the server
CMD ["node", "bin/stampede-worker.js"]

0 comments on commit f33332e

Please sign in to comment.