-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile-client
executable file
Β·111 lines (100 loc) Β· 3.18 KB
/
Dockerfile-client
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
ARG REPO_URL
ARG REPO_NAME
ARG STAGE
ARG TAG
FROM ${REPO_URL}/${REPO_NAME}-root:${TAG} as builder
# Create app directory
WORKDIR /app
COPY package.json .
COPY packages/client/package.json ./packages/client/
COPY packages/client-core/package.json ./packages/client-core/
COPY packages/editor/package.json ./packages/editor/
COPY packages/hyperflux/package.json ./packages/hyperflux/
COPY project-package-jsons ./
COPY packages/ui/package.json ./packages/ui/
COPY patches/ ./patches/
ARG NODE_ENV
RUN npm install --loglevel notice --legacy-peer-deps --production
# copy then compile the code
COPY . .
ARG KUBERNETES
ARG STAGE
ARG STORAGE_PROVIDER
ARG STORAGE_CLOUDFRONT_DOMAIN
ARG STORAGE_CLOUDFRONT_DISTIRBUTION_ID
ARG STORAGE_S3_STATIC_RESOURCE_BUCKET
ARG STORAGE_AWS_ACCESS_KEY_ID
ARG STORAGE_AWS_ACCESS_KEY_SECRET
ARG STORAGE_AWS_ROLE_ARN
ARG STORAGE_AWS_ENABLE_ACLS
ARG STORAGE_S3_REGION
ARG STORAGE_S3_AVATAR_DIRECTORY
ARG SERVE_CLIENT_FROM_STORAGE_PROVIDER
ARG MYSQL_HOST
ARG MYSQL_USER
ARG MYSQL_PORT
ARG MYSQL_PASSWORD
ARG MYSQL_DATABASE
ARG VITE_APP_HOST
ARG VITE_APP_PORT
ARG VITE_PWA_ENABLED
ARG VITE_SERVER_HOST
ARG VITE_SERVER_PORT
ARG VITE_FEATHERS_STORE_KEY
ARG VITE_FILE_SERVER
ARG VITE_MEDIATOR_SERVER
ARG VITE_LOGIN_WITH_WALLET
ARG VITE_8TH_WALL
ARG VITE_INSTANCESERVER_HOST
ARG VITE_INSTANCESERVER_PORT
ARG VITE_LOCAL_BUILD
ARG VITE_SOURCEMAPS
ARG VITE_READY_PLAYER_ME_URL
ARG VITE_DISABLE_LOG
ARG VITE_AVATURN_URL
ARG VITE_AVATURN_API
ARG AUTH_SECRET
ARG VITE_ZENDESK_ENABLED
ARG VITE_ZENDESK_KEY
ARG VITE_ZENDESK_AUTHENTICATION_ENABLED
ENV KUBERNETES=$KUBERNETES
ENV AUTH_SECRET=$AUTH_SECRET
ENV STORAGE_CLOUDFRONT_DOMAIN=$STORAGE_CLOUDFRONT_DOMAIN
ENV STORAGE_CLOUDFRONT_DISTRIBUTION_ID=$STORAGE_CLOUDFRONT_DISTRIBUTION_ID
ENV STORAGE_AWS_ROLE_ARN=$STORAGE_AWS_ROLE_ARN
ENV STORAGE_AWS_ENABLE_ACLS=$STORAGE_AWS_ENABLE_ACLS
ENV MYSQL_HOST=$MYSQL_HOST
ENV MYSQL_PORT=$MYSQL_PORT
ENV MYSQL_PASSWORD=$MYSQL_PASSWORD
ENV MYSQL_DATABASE=$MYSQL_DATABASE
ENV MYSQL_USER=$MYSQL_USER
ENV VITE_APP_HOST=$VITE_APP_HOST
ENV VITE_APP_PORT=$VITE_APP_PORT
ENV VITE_PWA_ENABLED=$VITE_PWA_ENABLED
ENV VITE_SERVER_HOST=$VITE_SERVER_HOST
ENV VITE_FEATHERS_STORE_KEY=$VITE_FEATHERS_STORE_KEY
ENV VITE_FILE_SERVER=$VITE_FILE_SERVER
ENV VITE_SERVER_PORT=$VITE_SERVER_PORT
ENV VITE_MEDIATOR_SERVER=$VITE_MEDIATOR_SERVER
ENV VITE_LOGIN_WITH_WALLET=$VITE_LOGIN_WITH_WALLET
ENV VITE_8TH_WALL=$VITE_8TH_WALL
ENV VITE_INSTANCESERVER_HOST=$VITE_INSTANCESERVER_HOST
ENV VITE_INSTANCESERVER_PORT=$VITE_INSTANCESERVER_PORT
ENV VITE_LOCAL_BUILD=$VITE_LOCAL_BUILD
ENV VITE_SOURCEMAPS=$VITE_SOURCEMAPS
ENV VITE_READY_PLAYER_ME_URL=$VITE_READY_PLAYER_ME_URL
ENV VITE_DISABLE_LOG=$VITE_DISABLE_LOG
ENV VITE_AVATURN_URL=$VITE_AVATURN_URL
ENV VITE_AVATURN_API=$VITE_AVATURN_API
ENV VITE_ZENDESK_ENABLED=$VITE_ZENDESK_ENABLED
ENV VITE_ZENDESK_KEY=$VITE_ZENDESK_KEY
ENV VITE_ZENDESK_AUTHENTICATION_ENABLED=$VITE_ZENDESK_AUTHENTICATION_ENABLED
RUN npm run build-client
RUN rm -r packages/client/public
ENV APP_ENV=production
FROM node:18-buster-slim as runner
WORKDIR /app
COPY --from=builder /app/packages/client ./packages/client
COPY --from=builder /app/scripts ./scripts
RUN npm install app-root-path koa koa-body koa-qs koa-static
CMD ["scripts/start-server.sh"]