-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
42 lines (33 loc) · 1.07 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
32
33
34
35
36
37
38
39
40
41
42
FROM node:20.11-alpine
# install packages
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh python3 py3-pip build-base
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Get Argument
ARG NEXT_PUBLIC_SENTRY_DSN
ARG SENTRY_DSN
ARG SENTRY_AUTH_TOKEN
ARG SOURCE_COMMIT
ARG TAG
ARG NEXT_PUBLIC_HCAPTCHA_SITEKEY
ENV NEXT_PUBLIC_SENTRY_DSN $NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SOURCE_COMMIT $SOURCE_COMMIT
ENV NEXT_PUBLIC_HCAPTCHA_SITEKEY $NEXT_PUBLIC_HCAPTCHA_SITEKEY
ENV NEXT_PUBLIC_TAG $TAG
ENV SENTRY_DSN $SENTRY_DSN
ENV SENTRY_AUTH_TOKEN $SENTRY_AUTH_TOKEN
ENV SENTRY_ORG koreanbots
ENV SENTRY_PROJECT api
# Installing dependencies
COPY package*.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install
# Copying source files
COPY . /usr/src/app
RUN printf "NEXT_PUBLIC_TESTER_KEY=9f9c4a7ae9afeb045fe818ed8b741c70b1d25ec236b189566a0db020c5596441\nNEXT_PUBLIC_COMMIT_HASH=$(git rev-parse HEAD)\nNEXT_PUBLIC_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')" > .env.local
# Building app
RUN yarn build
# Running the app
CMD yarn start