-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (28 loc) · 873 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
FROM node:17-alpine3.14
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . ./
ARG MONGODB_URL=mongodb
ARG MONGODB_NAME=finra-short-api
ARG MONGODB_PORT=27017
ARG MONGO_INITDB_ROOT_USERNAME=admin
ARG MONGO_INITDB_ROOT_PASSWORD=secret
ARG JWT_SECRET=SomeRandomString
ARG ADMIN_SECRET=RandomSecretForUserCreationRoute
ARG SENTRY_DSN=https://public@sentry.example.com/1
ARG SENTRY_TRACE_RATE=0.25
ENV MONGODB_URL=${MONGODB_URL}
ENV MONGODB_NAME=${MONGODB_NAME}
ENV MONGODB_PORT=${MONGODB_PORT}
ENV MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
ENV MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
ENV JWT_SECRET=${JWT_SECRET}
ENV ADMIN_SECRET=${ADMIN_SECRET}
ENV SANDBOX_TOKEN=${SANDBOX_TOKEN}
ENV SENTRY_DSN=${SENTRY_DSN}
ENV SENTRY_TRACE_RATE=${SENTRY_TRACE_RATE}
ENV PORT=3001
EXPOSE 3001
RUN npm run build
CMD ["npm", "run", "start:prod"]