Converted Dockertfile to docker-compose.yml

This commit is contained in:
Josh Black 2017-09-23 17:16:16 -06:00
parent 21985922c2
commit 765e0b825a
2 changed files with 14 additions and 38 deletions

View File

@ -1,38 +0,0 @@
# Base image
FROM node:8.5.0
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Bundle app source
COPY . /usr/src/app
## Install app dependencies
RUN npm install
## tell the port number the container should expose
EXPOSE 3000
## run the application
CMD ["npm", "run", "dev"]
## our base image
#FROM node:6.9.1
#
## Create app directory
#RUN mkdir -p /usr/src/app
#WORKDIR /usr/src/app
#
## Install app dependencies
#COPY package.json /usr/src/app/
#RUN npm install && \
# npm install -g nodemon
#
## Bundle app source
#COPY . /usr/src/app
#
#
## run the application
#CMD ["nodemon", "app.js"]

14
docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: "2"
services:
web:
build: .
ports:
- "3000:3000"
links:
- mongo
# mongo:
# image: mongo
# volumes:
# - /data/mongodb/db:/data/db
# ports:
# - "27017:27017"