Skip to content

Instantly share code, notes, and snippets.

@fguisso
Created March 20, 2017 17:36
Show Gist options
  • Save fguisso/052fa773efd2c7690b1ec38e2099cb1a to your computer and use it in GitHub Desktop.
Save fguisso/052fa773efd2c7690b1ec38e2099cb1a to your computer and use it in GitHub Desktop.
api:
container_name: nodejs
build: ./server
working_dir: /usr/src/api
volumes:
- ./server:/usr/src/api
env_file:
- ./server/.env
links:
- mongodb
ports:
- "3000:3000"
command: yarn && gulp babel && yarn run start
mongodb:
container_name: mongodb
image: mongo
FROM node:7.6.0
RUN mkdir -p /usr/src/app && \
apt-get update && apt-get install -y curl apt-transport-https && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install yarn && npm install -g gulp-cli
WORKDIR /usr/src/app
RUN yarn;gulp babel
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment