forked from botfront/botfront
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile_alt
More file actions
32 lines (24 loc) · 959 Bytes
/
Copy pathDockerfile_alt
File metadata and controls
32 lines (24 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:8-alpine
ENV NODE_ENV production
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
# Copy in bundle
COPY ./entrypoint.sh $SCRIPTS_FOLDER/
RUN chmod +x $SCRIPTS_FOLDER/entrypoint.sh
# Copy in entrypoint
COPY ./bundle $APP_BUNDLE_FOLDER/
# Install app
RUN npm install -C $APP_BUNDLE_FOLDER/bundle/programs/server
# Install OS build dependencies, which we remove later after we’ve compiled native Node extensions
# RUN apk --no-cache --virtual .node-gyp-compilation-dependencies add \
# g++ make python
# RUN npm rebuild --build-from-source -C $APP_BUNDLE_FOLDER/bundle/programs/server
# RUN npm rebuild --build-from-source -C $APP_BUNDLE_FOLDER/bundle/programs/server/npm
# RUN apk del .node-gyp-compilation-dependencies
# Install runtime deps
RUN apk --no-cache add \
bash ca-certificates
RUN npm install -C $SCRIPTS_FOLDER p-wait-for mongodb
VOLUME [ "/app/models"]
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "main.js"]