forked from hexxagon-io/chain-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (38 loc) · 1.31 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
FROM node:18 as assets-builder
WORKDIR /assets
RUN set -eux && \
git clone https://github.com/hexxagon-io/assets.git ./
RUN set -eux && \
npm install && \
npm run build
###############################################################################
FROM node:18 as hexxagon-chain-registry-builder
ARG CF_PAGES_URL="https://station-assets.pages.dev"
ARG FND_BASE_URL="https://finder.terra-classic.hexxagon.io"
ENV CF_PAGES_URL=${CF_PAGES_URL}
ENV FND_BASE_URL=${FND_BASE_URL}
WORKDIR /assets
COPY . .
RUN set -eux && \
npm install && \
npm run build
###############################################################################
FROM node:18-alpine
WORKDIR /assets
COPY ./serve.js ./serve.js
COPY --from=hexxagon-chain-registry-builder /assets/build/* ./public/
COPY --from=assets-builder /assets/station/*json ./public/station/
COPY --from=assets-builder /assets/ibc/*json ./public/ibc/
COPY --from=assets-builder /assets/cw20/*json ./public/cw20/
COPY --from=assets-builder /assets/extensions.json ./public/extensions.json
RUN set -eux && \
npm init -y && \
npm install cors express && \
mkdir -p /assets/public/img && \
cd /assets/public/img && \
ln -s ../coins coins && \
ln -s ../chains chains
# Expose port 3001
EXPOSE 3001
# Start the Express app
CMD [ "node", "serve.js" ]