Skip to content

Instantly share code, notes, and snippets.

@marr

marr/Dockerfile Secret

Last active September 1, 2017 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marr/205b1d8108063c45678a3df53bef1f1d to your computer and use it in GitHub Desktop.
Save marr/205b1d8108063c45678a3df53bef1f1d to your computer and use it in GitHub Desktop.
version: '2'
services:
app:
build:
context: .
args:
- NPM_TOKEN
- OPS_NPM_TOKEN
links:
- redis
ports:
- "3001:3001"
redis:
image: redis
ports:
- "6379"
FROM node:stretch
ENV APP=venuemapsapi
## nodejs
ARG NPM_TOKEN
WORKDIR /usr/src/app
ADD . /usr/src/app
RUN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN:-$OPS_NPM_TOKEN}" > ~/.npmrc
RUN npm install
RUN rm -rf ~/.npmrc
CMD [ "npm", "start" ]
EXPOSE 3001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment