-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
37 lines (25 loc) · 995 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
FROM bitwalker/alpine-elixir-phoenix:1.9.4
RUN apk --no-cache --update add alpine-sdk gmp-dev automake libtool inotify-tools autoconf python git
EXPOSE 4000
ENV PORT=4000 \
MIX_ENV="prod" \
SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5"
# Cache elixir deps
RUN rm -rf /opt/app
RUN git clone https://github.com/poanetwork/blockscout.git /opt/app
RUN mix do deps.get, local.rebar --force, deps.compile
ADD . .
ARG COIN
RUN if [ "$COIN" != "" ]; then sed -i s/"POA"/"${COIN}"/g apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po; fi
# Run forderground build and phoenix digest
RUN mix compile
# Add blockscout npm deps
RUN cd apps/block_scout_web/assets/ && \
npm install && \
npm run deploy && \
cd -
RUN cd apps/explorer/ && \
npm install && \
apk update && apk del --force-broken-world alpine-sdk gmp-dev automake libtool inotify-tools autoconf python
RUN mix phx.digest
ENTRYPOINT [ "/opt/app/entrypoint.sh" ]