-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (44 loc) · 1.37 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM node:18.15.0-alpine3.17
# app
ARG APP_BASE_PATH
ENV APP_BASE_PATH="${APP_BASE_PATH}"
ARG APP_DEV_SERVER_PORT
ENV APP_DEV_SERVER_PORT="${APP_DEV_SERVER_PORT}"
ARG APP_HOST="0.0.0.0"
ENV APP_HOST="${APP_HOST}"
ARG APP_MORGAN_FORMAT="combined"
ENV APP_MORGAN_FORMAT="${APP_MORGAN_FORMAT}"
ARG APP_PORT=8080
ENV APP_PORT="${APP_PORT}"
ARG APP_PUBLIC_PATH
ENV APP_PUBLIC_PATH="${APP_PUBLIC_PATH}"
ARG APP_REVISION
ENV APP_REVISION="${APP_REVISION}"
ARG APP_VERSION
ENV APP_VERSION="${APP_VERSION}"
# api
ARG APP_API_PORT=8081
ENV APP_API_PORT="${APP_API_PORT}"
ARG APP_API_PROXY_DISABLED=0
ENV APP_API_PROXY_DISABLED="${APP_API_PROXY_DISABLED}"
ARG APP_API_PROXY_PATH="/api"
ENV APP_API_PROXY_PATH="${APP_API_PROXY_PATH}"
ARG APP_API_PROXY_TARGET="http://0.0.0.0:8081"
ENV APP_API_PROXY_TARGET="${APP_API_PROXY_TARGET}"
ARG APP_API_TARGET="http://0.0.0.0:8081"
ENV APP_API_TARGET="${APP_API_TARGET}"
# other
ARG BABEL_ENV="production"
ENV BABEL_ENV="${BABEL_ENV}"
ARG NODE_ENV="production"
ENV NODE_ENV="${NODE_ENV}"
ARG NODE_PATH="./src"
ENV NODE_PATH="${NODE_PATH}"
ARG UNIVERSAL_WEBPACK_CSS_LOADER_V4="true"
ENV UNIVERSAL_WEBPACK_CSS_LOADER_V4="${UNIVERSAL_WEBPACK_CSS_LOADER_V4}"
WORKDIR /srv/universal-redux/
COPY . .
RUN yarn cache clean \
&& NODE_ENV="development" yarn install --ignore-scripts --network-timeout 240000 \
&& yarn build
CMD ["/usr/local/bin/yarn", "start"]