u
u
This commit is contained in:
parent
0b2245adc9
commit
f110e7f87a
1 changed files with 15 additions and 9 deletions
24
Dockerfile
24
Dockerfile
|
@ -1,13 +1,19 @@
|
||||||
FROM node:8.6
|
FROM node:10.13.0-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json /app/
|
||||||
|
|
||||||
|
RUN apk add --no-cache tzdata
|
||||||
|
ENV TZ=America/Argentina/Buenos_Aires
|
||||||
|
|
||||||
# First install dependencies
|
|
||||||
COPY ./package.json ./app/
|
|
||||||
WORKDIR /app/
|
|
||||||
ENV NODE_ENV production
|
|
||||||
RUN npm install --no-progress --production && npm install --no-progress passport-ldapjs passport-ldapauth
|
|
||||||
# Later, copy the app files. That improves development speed as buiding the Docker image will not have
|
# Later, copy the app files. That improves development speed as buiding the Docker image will not have
|
||||||
# to download and install all the NPM dependencies every time there's a change in the source code
|
# to download and install all the NPM dependencies every time there's a change in the source code
|
||||||
COPY . /app
|
ENV NODE_ENV production
|
||||||
|
RUN npm install --no-progress --production && npm install --no-progress passport-ldapjs passport-ldapauth
|
||||||
|
|
||||||
|
COPY . /app/
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"]
|
|
||||||
CMD ["node", "index.js"]
|
CMD npm run start
|
Loading…
Add table
Add a link
Reference in a new issue