-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile.production
33 lines (28 loc) · 829 Bytes
/
Dockerfile.production
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
# build env
FROM node:18-slim as build
RUN apt-get update && apt-get install -y python3 make g++
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . ./
ARG BUGSNAG_KEY
ENV BUGSNAG_KEY=${BUGSNAG_KEY}
ARG DIRECTORY_PROTOCOL=https
ENV DIRECTORY_PROTOCOL=${DIRECTORY_PROTOCOL}
ARG DIRECTORY_DOMAIN=cosmos.directory
ENV DIRECTORY_DOMAIN=${DIRECTORY_DOMAIN}
ARG DIRECTORY_DOMAIN_TESTNET=testcosmos.directory
ENV DIRECTORY_DOMAIN_TESTNET=${DIRECTORY_DOMAIN_TESTNET}
ARG TESTNET_MODE
ENV TESTNET_MODE=${TESTNET_MODE}
ARG MAINNET_DOMAIN
ENV MAINNET_DOMAIN=${MAINNET_DOMAIN}
ARG TESTNET_DOMAIN
ENV TESTNET_DOMAIN=${TESTNET_DOMAIN}
RUN npm run build
# production env
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]