forked from GolosChain/tolstoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (26 loc) · 817 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
33
34
35
36
37
38
FROM node:7.5
# yarn > npm
#RUN npm install --global yarn
RUN npm install -g yarn
WORKDIR /var/app
RUN mkdir -p /var/app
ADD package.json /var/app/package.json
RUN yarn
# Update @steem/crypto-session package to prevent koa-session crash
sed '65s/.*/ console\.error\("\@steem\/crypto-session: Discarding session", text, error2\)\; return \{\}\;/' node_modules/\@steem/crypto-session/index.js
COPY . /var/app
# FIXME TODO: fix eslint warnings
#RUN mkdir tmp && \
# npm test && \
# ./node_modules/.bin/eslint . && \
# npm run build
RUN mkdir tmp && \
npm test && \
npm run-script build
ENV PORT 8080
ENV NODE_ENV production
EXPOSE 8080
CMD [ "yarn", "run", "production" ]
# uncomment the lines below to run it in development mode
# ENV NODE_ENV development
# CMD [ "yarn", "run", "start" ]