forked from tirumaraiselvan/hasura-serverless
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (28 loc) · 785 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
FROM node:8-alpine as builder
ARG HGE_HOSTNAME
ARG PAY_ALL_URL
ARG MAKE_PAYMENT_URL
ARG ORDER_APP_URL
ARG ANALYTICS_APP_URL
ENV REACT_APP_HGE_HOSTNAME=${HGE_HOSTNAME}
ENV REACT_APP_PAY_ALL_URL=${PAY_ALL_URL}
ENV REACT_APP_MAKE_PAYMENT_URL=${MAKE_PAYMENT_URL}
# build order app
# ENV PUBLIC_URL=${ORDER_APP_URL}
WORKDIR /order-app
COPY order-app/package.json package.json
RUN npm install
COPY order-app ./
RUN npm run build
# build analytics app
# ENV PUBLIC_URL=${ANALYTICS_APP_URL}
WORKDIR /analytics-app
COPY analytics-app/package.json package.json
RUN npm install
COPY analytics-app ./
RUN npm run build
FROM abiosoft/caddy:0.11.0
WORKDIR /html
COPY index.html index.html
COPY --from=builder /order-app/build order-app/
COPY --from=builder /analytics-app/build analytics-app/