2024-09-22 18:09:05 -04:00
|
|
|
FROM node:22.9.0-alpine3.20
|
2017-04-20 08:33:12 -04:00
|
|
|
|
|
|
|
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
|
2017-08-31 14:56:22 -04:00
|
|
|
RUN apk --no-cache add vim git
|
2017-04-20 08:33:12 -04:00
|
|
|
COPY .vimrc /root/.vimrc
|
|
|
|
|
|
|
|
COPY package.json /usr/src/app/
|
|
|
|
COPY . /usr/src/app
|
|
|
|
RUN npm install
|
|
|
|
|
2017-08-31 14:56:22 -04:00
|
|
|
# To upgrade, in host CodeMirror dir, do `git pull` and `git checkout tags/###`.
|
|
|
|
# Running `npm run build` here to save a step.
|
2024-09-14 15:32:27 -04:00
|
|
|
#RUN cd /usr/src/app/CodeMirror && npm run build
|
2017-08-31 14:56:22 -04:00
|
|
|
|
2017-04-20 08:33:12 -04:00
|
|
|
# Use nodemon to start app.
|
2024-09-22 18:09:05 -04:00
|
|
|
CMD [ "nodemon", "--env-file=.env", "server.js" ]
|