-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (59 loc) · 2.08 KB
/
Copy pathDockerfile
File metadata and controls
73 lines (59 loc) · 2.08 KB
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
FROM node:20.18.0-slim AS builder
WORKDIR /app
ARG NODE_OPTIONS="--max-old-space-size=4096"
ARG GITHUB_SHA
ENV NODE_OPTIONS=$NODE_OPTIONS
ENV GITHUB_SHA=$GITHUB_SHA
# Enable Corepack to use the correct Yarn version from package.json
RUN corepack enable
COPY package.json yarn.lock .yarnrc.yml ./
RUN --mount=type=cache,target=/root/.yarn,sharing=locked \
yarn install --immutable
COPY index.html published.html ./
COPY tsconfig.json vite.config.ts ./
COPY src ./src
COPY public ./public
RUN yarn build
FROM nginx:1.27-alpine
WORKDIR /usr/share/nginx/html
# Quite the Nginx startup logs.
ENV NGINX_ENTRYPOINT_QUIET_LOGS=true
# Default to Cloud Run port.
# Ref: https://cloud.google.com/run/docs/reference/container-contract#port
ENV PORT=8080
# Defaults Google Cloud Load Balancer header.
# Ref: https://cloud.google.com/load-balancing/docs/https#target-proxies
ENV REAL_IP_HEADER=X-Forwarded-For
# Default values.
ENV REEARTH_API=null
ENV REEARTH_AUTH0_AUDIENCE=null
ENV REEARTH_AUTH0_CLIENT_ID=null
ENV REEARTH_AUTH0_DOMAIN=null
ENV REEARTH_BRAND=null
ENV REEARTH_CLOUD_API=null
ENV REEARTH_CURRENT_TOS=null
ENV REEARTH_CUSTOM_PROVIDERS=null
ENV REEARTH_DEVELOPER_MODE=null
ENV REEARTH_DOCUMENTATION_URL=null
ENV REEARTH_EARLY_ACCESS_ADMINS=[]
ENV REEARTH_EXTENSION_URLS=[]
ENV REEARTH_FAVICON_URL=
ENV REEARTH_IP=null
ENV REEARTH_MARKETPLACE_URL=null
ENV REEARTH_MULTI_TENANT=null
ENV REEARTH_PASSWORD_POLICY=null
ENV REEARTH_PLUGINS=null
ENV REEARTH_POLICY=null
ENV REEARTH_PUBLISHED=null
ENV REEARTH_TITLE=
ENV REEARTH_UNSAFE_PLUGIN_URLS=[]
ENV REEARTH_TILE_SERVER_BASE_URL=null
ENV REEARTH_TILE_SERVER_TOKEN=null
RUN --mount=type=cache,target=/var/cache/apk \
apk add --no-cache jq
COPY --from=builder --chown=nginx:nginx /app/dist /usr/share/nginx/html
COPY --chown=nginx:nginx docker/nginx.conf.template /etc/nginx/templates/nginx.conf.template
COPY --chown=nginx:nginx docker/40-envsubst-on-reearth-config.sh /docker-entrypoint.d
COPY --chown=nginx:nginx docker/reearth_config.json.template /opt/reearth/reearth_config.json.template
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]