-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
26 lines (22 loc) · 864 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
25
26
# Build the GrowthBook Proxy app
FROM node:18-slim
WORKDIR /usr/local/src/app
# Copy over minimum files to install dependencies
COPY package.json ./package.json
COPY yarn.lock ./yarn.lock
COPY packages/apps/proxy/package.json ./packages/apps/proxy/package.json
COPY packages/lib/eval/package.json ./packages/lib/eval/package.json
# Yarn install with dev dependencies
RUN yarn install --frozen-lockfile --ignore-optional
# Build the proxy app and do a clean install with only production dependencies
COPY packages ./packages
RUN \
yarn build:proxy \
&& rm -rf node_modules \
&& rm -rf packages/apps/proxy/node_modules \
&& rm -rf packages/lib/eval/node_modules \
&& yarn install --frozen-lockfile --production=true --ignore-optional
# Directory with build info (git commit sha, build date)
COPY buildinfo* ./buildinfo
EXPOSE 3300
CMD ["yarn","start"]