Converted Dockertfile to docker-compose.yml
This commit is contained in:
parent
21985922c2
commit
765e0b825a
38
Dockerfile
38
Dockerfile
|
|
@ -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"]
|
||||
|
|
@ -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"
|
||||
Loading…
Reference in New Issue