-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathDockerfile
24 lines (23 loc) · 874 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
FROM node:16 AS builder
ARG SENTRY_AUTH_TOKEN
ENV NODE_ENV=production
ENV SENTRY_ORG=tdjsnelling
ENV SENTRY_PROJECT=sqtracker-frontend
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
WORKDIR /sqtracker
COPY . .
RUN yarn install
RUN echo "{}" > /config.js
RUN ./node_modules/.bin/next build
FROM node:16-alpine
ENV NODE_ENV=production
ENV SENTRY_DSN="https://[email protected]/4504646040616960"
LABEL org.opencontainers.image.source=https://github.com/tdjsnelling/sqtracker
WORKDIR /sqtracker/client
COPY --from=builder /sqtracker/node_modules ./node_modules
COPY --from=builder /sqtracker/public ./public
COPY --from=builder /sqtracker/.next ./.next
COPY --from=builder /sqtracker/next.config.js ./next.config.js
COPY --from=builder /sqtracker/package.json ./package.json
EXPOSE 3000
CMD ["node_modules/.bin/next", "start", "-p", "3000"]