-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 1.76 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
# syntax = docker/dockerfile:1.2
FROM node:17-buster
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run generate
RUN npm run build:production
RUN --mount=type=secret,id=sentry_auth_token --mount=type=secret,id=sentry_org --mount=type=secret,id=sentry_project --mount=type=secret,id=sentry_version \
npx -y @sentry/cli releases new $(cat /run/secrets/sentry_version) --org $(cat /run/secrets/sentry_org) \
--project $(cat /run/secrets/sentry_project) --auth-token $(cat /run/secrets/sentry_auth_token)
RUN --mount=type=secret,id=sentry_auth_token --mount=type=secret,id=sentry_org --mount=type=secret,id=sentry_project --mount=type=secret,id=sentry_version \
npx -y @sentry/cli releases files $(cat /run/secrets/sentry_version) upload-sourcemaps --ext map --ext js --ext ts ./dist \
--org $(cat /run/secrets/sentry_org) \
--project $(cat /run/secrets/sentry_project) --auth-token $(cat /run/secrets/sentry_auth_token)
RUN --mount=type=secret,id=sentry_auth_token --mount=type=secret,id=sentry_org --mount=type=secret,id=sentry_project --mount=type=secret,id=sentry_version \
npx -y @sentry/cli releases set-commits $(cat /run/secrets/sentry_version) --auto --org $(cat /run/secrets/sentry_org) \
--project $(cat /run/secrets/sentry_project) --auth-token $(cat /run/secrets/sentry_auth_token)
RUN --mount=type=secret,id=sentry_auth_token --mount=type=secret,id=sentry_org --mount=type=secret,id=sentry_project --mount=type=secret,id=sentry_version \
npx -y @sentry/cli releases finalize $(cat /run/secrets/sentry_version) --org $(cat /run/secrets/sentry_org) \
--project $(cat /run/secrets/sentry_project) --auth-token $(cat /run/secrets/sentry_auth_token)
CMD [ "npm", "run", "start" ]