-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
47 lines (38 loc) · 1.27 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
FROM node:14.16.1-alpine
ARG MAPBOX_API_TOKEN=not_valid
ARG datasetEnv=production
ARG facebookUser=worldresources
ARG twitterUser=worldresources
ARG apiUrl=https://www.prepdata.org/api
ARG assetsUrl=
ARG rwApiUrl=https://api.resourcewatch.org/v1
ARG basemapUrl=https://api.mapbox.com/styles/v1/resourcewatch/cjjr8d2qw19y92smuuzydlpdv/tiles/256/{z}/{x}/{y}?access_token=${MAPBOX_API_TOKEN}
ARG nodeEnv=production
ARG callbackUrl=https://prepdata.org/auth
ENV DEBIAN_FRONTEND noninteractive
ENV RW_API_LOGIN_URL https://api.resourcewatch.org/auth
ENV RW_API_IS_LOGGEDIN_URL https://api.resourcewatch.org/auth/check-logged
ENV CALLBACK_URL $callbackUrl
ENV APPLICATIONS prep
ENV DATASET_ENV $datasetEnv
ENV FACEBOOK_USER $facebookUser
ENV TWITTER_USER $twitterUser
ENV API_URL $apiUrl
ENV ASSETS_URL $assetsUrl
ENV RW_API_URL $rwApiUrl
ENV BASEMAP_TILE_URL $basemapUrl
ENV NODE_ENV $nodeEnv
ENV GOOGLE_ANALYTICS UA-67196006-2
RUN apk update && apk add --no-cache \
build-base gcc bash git \
cairo-dev pango-dev jpeg-dev
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install --prod --ignore-optional --frozen-lockfile
# Bundle app source
COPY . /usr/src/app
RUN yarn run build
EXPOSE 3000
CMD ["yarn", "start"]