-
Notifications
You must be signed in to change notification settings - Fork 45
/
Dockerfile
42 lines (33 loc) · 997 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
41
42
FROM ubuntu
# Disable all user interactivity during build
ENV DEBIAN_FRONTEND noninteractive
ARG GATSBY_IPFS_HTTP_URI
ARG GATSBY_NETWORK_CONNECTOR_URI
ARG GATSBY_INFURA_ID
ARG GATSBY_NETWORK_URI
ARG GATSBY_GRAPHQL_HTTP_URI
ARG GATSBY_CHAIN_ID
RUN apt update -y
RUN apt-get install -y software-properties-common git build-essential
# Install NPM and Yarn
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g yarn lerna
RUN yarn global add ipfs-deploy
# Copy root files
WORKDIR /opt/everest
COPY . .
# Install dependencies; include dev dependencies
ENV NODE_ENV production
RUN yarn --pure-lockfile --non-interactive --production=false
# Build source
RUN yarn build:mutations
RUN yarn build:ui
COPY package.json .
COPY yarn.lock .
COPY lerna.json .
# Regenerate and publish the UI and project pages whenever necessary
WORKDIR /opt/everest/ui/
ENV PATH "${PATH}:/root/go/bin/"
CMD ["node", "build-projects"]