-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
32 lines (21 loc) · 844 Bytes
/
Dockerfile
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:10.16.0
ENV STA_APP_DIR=/root/app \
STA_HTTP_PORT=3000 \
NODE_ENV=production
ENV STA_HELPER_FUNCTIONS_FILE=$STA_APP_DIR/docker/helper-functions.sh
WORKDIR $STA_APP_DIR
COPY package.json "$STA_APP_DIR/package.json"
COPY package-lock.json "$STA_APP_DIR/package-lock.json"
COPY makeReactScriptGenerateBundleStatsAgain.js "$STA_APP_DIR/makeReactScriptGenerateBundleStatsAgain.js"
RUN cd "$STA_APP_DIR" && \
NODE_ENV=development npm install
RUN cd "$STA_APP_DIR" && \
node "$STA_APP_DIR/makeReactScriptGenerateBundleStatsAgain.js"
COPY ./ "$STA_APP_DIR"
RUN cd "$STA_APP_DIR" && \
NODE_ENV=production GENERATE_SOURCEMAP=false npm run build
#RUN cd "$STA_APP_DIR" && \
# NODE_ENV=production npm prune --production
COPY docker/entrypoint.sh /usr/local/bin
EXPOSE $STA_HTTP_PORT
ENTRYPOINT ["entrypoint.sh"]