forked from resource-watch/resource-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (60 loc) · 2.03 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM node:14.15-alpine
LABEL maintainer="[email protected]"
ARG NEXT_PUBLIC_CALLBACK_URL=https://resourcewatch.org/auth
ARG NEXT_PUBLIC_RW_GOGGLE_API_TOKEN_SHORTENER=not_valid
ARG NEXT_PUBLIC_RW_MAPBOX_API_TOKEN=not_valid
ARG NEXT_PUBLIC_WRI_API_URL=https://api.resourcewatch.org
ARG NEXT_PUBLIC_FEATURE_FLAG_OCEAN_WATCH=false
ENV NEXT_PUBLIC_ADD_SEARCH_KEY ea4c79622844ade140170b141c36f14f
ENV NEXT_PUBLIC_API_ENV production
ENV NEXT_PUBLIC_APPLICATIONS rw
ENV NEXT_PUBLIC_BING_MAPS_API_KEY PPB0chXATYqlJ5t8oMPp~8SV9SIe2D0Ntc5sW3HExZA~AqTJgLkvvOdot-y1QukRox537t604Je0pxhygfcraTQGVWr7Ko9LwPoS7-MHW0qY
ENV NEXT_PUBLIC_BITLY_TOKEN e3076fc3bfeee976efb9966f49383e1a8fb71c5f
ENV NEXT_PUBLIC_BLOG_API_URL https://blog.resourcewatch.org/wp-json/wp/v2
ENV NEXT_PUBLIC_CALLBACK_URL $NEXT_PUBLIC_CALLBACK_URL
ENV NEXT_PUBLIC_GOOGLE_ANALYTICS UA-67196006-1
ENV NODE_ENV production
ENV NEXT_PUBLIC_RW_GOGGLE_API_TOKEN_SHORTENER $NEXT_PUBLIC_RW_GOGGLE_API_TOKEN_SHORTENER
ENV NEXT_PUBLIC_RW_MAPBOX_API_TOKEN $NEXT_PUBLIC_RW_MAPBOX_API_TOKEN
ENV NEXT_PUBLIC_WRI_API_URL $NEXT_PUBLIC_WRI_API_URL
ENV NEXT_PUBLIC_FEATURE_FLAG_OCEAN_WATCH $NEXT_PUBLIC_FEATURE_FLAG_OCEAN_WATCH
RUN apk update && apk add --no-cache \
build-base gcc bash git \
cairo-dev pango-dev jpeg-dev
# Add app directory
WORKDIR /usr/src/app
# Copy app folders
COPY components ./components
COPY constants ./constants
COPY css ./css
COPY hooks ./hooks
COPY layout ./layout
COPY lib ./lib
COPY modules ./modules
COPY pages ./pages
COPY public ./public
COPY redactions ./redactions
COPY selectors ./selectors
COPY services ./services
COPY server ./server
COPY utils ./utils
COPY test ./test
COPY scripts ./scripts
# Copy single files
COPY .babelrc .
COPY .browserlistrc .
COPY package.json .
COPY yarn.lock .
COPY api.md .
COPY index.js .
COPY next.config.js .
COPY next-sitemap.js .
COPY postcss.config.js .
COPY jsconfig.json .
COPY .env.test .
COPY .env.production .
RUN yarn install --frozen-lockfile --production=false
RUN yarn build
COPY entrypoint.sh .
EXPOSE 3000
ENTRYPOINT ["sh", "./entrypoint.sh"]