Skip to content

Instantly share code, notes, and snippets.

@sastraxi
Created November 7, 2017 18:39
Show Gist options
  • Save sastraxi/60ec4e5f4a4672814e0cb81e757eafe3 to your computer and use it in GitHub Desktop.
Save sastraxi/60ec4e5f4a4672814e0cb81e757eafe3 to your computer and use it in GitHub Desktop.
FROM node:6-slim
# Put micro-support where it can be found
RUN mkdir -p /usr/src
COPY build-context /usr/src
# Working directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install depdencies
COPY package.json /usr/src/app
RUN npm install
# Copy app over and build it
COPY .babelrc /usr/src/app/
COPY src /usr/src/app/src
COPY migrations /usr/src/app/migrations
RUN npm run build
# Expose the port
EXPOSE 1343
CMD ["npm", "run", "start:prod"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment