forked from fossasia/open-event-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (28 loc) · 732 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-alpine as builder
LABEL maintainer="Niranjan Rajendran <[email protected]>"
WORKDIR /app
RUN apk add git python-dev make g++ gettext
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
ARG api_host
ARG google_api_key
ENV API_HOST=$api_host
ENV GOOGLE_API_KEY=$google_api_key
RUN node scripts/l10n.js generate && \
touch .env && \
JOBS=1 yarn build -prod
##
##
FROM node:10-alpine
WORKDIR /fastboot
COPY scripts/fastboot-server.js .
COPY --from=builder /app/dist/ app/
RUN apk add --no-cache ca-certificates && \
cp app/package.json . && \
yarn install && \
yarn add fastboot-app-server && \
rm -rf yarn.lock && \
yarn cache clean
EXPOSE 4000
CMD ["node", "fastboot-server.js"]