mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
24 lines
609 B
Docker
24 lines
609 B
Docker
|
|
FROM ubuntu:20.04 as base
|
|
RUN apt-get update && apt-get -y install bash curl
|
|
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
|
|
RUN bash /tmp/nodesource_setup.sh
|
|
RUN apt install nodejs
|
|
|
|
|
|
|
|
FROM base as builder
|
|
RUN apt-get update && apt-get -y install wget
|
|
COPY package*.json /usr/src/app/
|
|
WORKDIR /usr/src/app/
|
|
ENV NODE_ENV=production
|
|
RUN npm ci
|
|
|
|
|
|
FROM base as runner
|
|
ENV NODE_ENV=production
|
|
COPY . /usr/src/app
|
|
WORKDIR /usr/src/app/
|
|
COPY --from=builder /usr/src/app/node_modules/ /usr/src/app/node_modules/
|
|
ENV DEPLOY_SUBGRAPH=true
|
|
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"] |