-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile
57 lines (48 loc) · 1.8 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM node:18.19.1-alpine AS package
ARG NEXT_PUBLIC_UMAMI_SITE_ID
ARG NEXT_PUBLIC_RECAPTCHA_SITEKEY
ARG NEXT_PUBLIC_ENVIRONMENT
ARG NEXT_PUBLIC_ORY_SDK_URL
ARG NEXT_PUBLIC_ORYCLOUD
ARG ENVIRONMENT
ARG NEXT_PUBLIC_ENABLE_BANNER_DONATION
ENV PARCEL_WORKERS=1
ENV NEW_RELIC_NO_CONFIG_FILE=true
ENV NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
ENV NEW_RELIC_LOG=stdout
COPY ./.babelrc /app/.babelrc
COPY config.$ENVIRONMENT.yaml /app/config.yaml
COPY config.websocket.$ENVIRONMENT.yaml /app/config.websocket.yaml
COPY config.seed.example.yaml /app/config.seed.yaml
COPY migrate-mongo-config-example.ts /app/migrate-mongo-config.ts
COPY ./migrations /app/migrations
COPY ./.eslintignore /app/.eslintignore
COPY ./.eslintrc.yml /app/.eslintrc.yml
COPY server/jest.config.json /app/jest.config.json
COPY ./next.config.js /app/next.config.js
COPY ./package.json /app/package.json
COPY ./yarn.lock /app/yarn.lock
COPY ./scripts /app/scripts
COPY ./tsconfig.json /app/tsconfig.json
COPY ./server /app/server
COPY ./src /app/src
COPY ./lib /app/lib
COPY ./public /app/public
COPY ./config /app/config
COPY ./next-i18next.config.js /app/next-i18next.config.js
WORKDIR /app
RUN cp config/localConfig.example.ts config/localConfig.ts
RUN apk add --no-cache git python3 make g++
RUN yarn install --production
RUN NEXT_PUBLIC_UMAMI_SITE_ID=$NEXT_PUBLIC_UMAMI_SITE_ID \
NEXT_PUBLIC_RECAPTCHA_SITEKEY=$NEXT_PUBLIC_RECAPTCHA_SITEKEY \
NEXT_PUBLIC_ENVIRONMENT=$NEXT_PUBLIC_ENVIRONMENT \
NEXT_PUBLIC_ORY_SDK_URL=$NEXT_PUBLIC_ORY_SDK_URL \
NEXT_PUBLIC_ORYCLOUD=$NEXT_PUBLIC_ORYCLOUD \
NEXT_PUBLIC_ENABLE_BANNER_DONATION=$NEXT_PUBLIC_ENABLE_BANNER_DONATION \
yarn build
FROM node:18.19.1-alpine
LABEL maintainer="Giovanni Rossini <[email protected]>"
COPY --from=package /app /app
WORKDIR /app
ENTRYPOINT [ "yarn", "start" ]