25 lines
547 B
Docker
25 lines
547 B
Docker
FROM node:8-alpine
|
|
|
|
EXPOSE 3000
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
RUN mkdir -p /usr/src/app/db
|
|
VOLUME ["/usr/src/app/db"]
|
|
|
|
RUN npm install -g nodemon
|
|
RUN apk --no-cache add vim git
|
|
COPY .vimrc /root/.vimrc
|
|
|
|
COPY package.json /usr/src/app/
|
|
COPY . /usr/src/app
|
|
RUN npm install
|
|
|
|
# Currently at CodeMirror-5.29.0.
|
|
# To upgrade, in host CodeMirror dir, do `git pull` and `git checkout tags/###`.
|
|
# Running `npm run build` here to save a step.
|
|
RUN cd /usr/src/app/CodeMirror && npm run build
|
|
|
|
# Use nodemon to start app.
|
|
CMD [ "nodemon" ]
|