Docker Updates

This commit is contained in:
Josh Black 2017-09-23 22:04:24 -06:00
parent 765e0b825a
commit 1198452c78
2 changed files with 29 additions and 7 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
# Base image
FROM mhart/alpine-node:8.5.0
## 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
# Bundle app source
COPY . /usr/src/app
## tell the port number the container should expose
EXPOSE 3000
## run the application
CMD ["npm", "run", "dev"]

View File

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