forked from steemit/condenser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (28 loc) · 776 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
39
40
FROM node:10.0
ARG SOURCE_COMMIT
ENV SOURCE_COMMIT ${SOURCE_COMMIT}
ARG DOCKER_TAG
ENV DOCKER_TAG ${DOCKER_TAG}
# yarn > npm
#RUN npm install --global yarn
RUN npm install -g yarn
WORKDIR /var/app
RUN mkdir -p /var/app
ADD package.json yarn.lock /var/app/
RUN chmod +x /usr/local/lib/node_modules/yarn/bin/yarn.js && \
yarn install --non-interactive --frozen-lockfile
COPY . /var/app
# FIXME TODO: fix eslint warnings
#RUN mkdir tmp && \
# npm test && \
# ./node_modules/.bin/eslint . && \
# npm run build
RUN mkdir tmp && \
yarn test && yarn 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" ]