Skip to content

Instantly share code, notes, and snippets.

@talk2MeGooseman
Last active December 3, 2017 08:56
Show Gist options
  • Save talk2MeGooseman/796e1de24a085ff465a173ea405c14f7 to your computer and use it in GitHub Desktop.
Save talk2MeGooseman/796e1de24a085ff465a173ea405c14f7 to your computer and use it in GitHub Desktop.
Simple docker file setup for node server
version: "3"
services:
server:
build: .
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
# create a file named Dockerfile
FROM node:alpine
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --production
COPY . ./
EXPOSE 3000
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment