-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 1.04 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
ARG BASE_IMAGE=node:22-alpine
FROM --platform=$BUILDPLATFORM $BASE_IMAGE AS playground-builder
WORKDIR /app
# Bring in everything not ignored by the dockerignore
COPY . .
ENV YARN_CACHE_FOLDER=/tmp/yarn_cache
# Environment variables for build time.
ARG VITE_GOOGLE_ANALYTICS_MEASUREMENT_ID=""
ARG VITE_POSTHOG_KEY=""
ARG VITE_POSTHOG_HOST=https://us.i.posthog.com
ARG VITE_DISCORD_CHANNEL_ID=""
ARG VITE_DISCORD_INVITE_URL="https://authzed.com/discord"
ARG VITE_DISCORD_SERVER_ID=""
RUN yarn install --frozen-lockfile --non-interactive --network-timeout 1000000
RUN yarn build
FROM $BASE_IMAGE AS playground-verifier
FROM nginx:1.25.2
LABEL maintainer="AuthZed <support@authzed.com>"
EXPOSE 3000
ENV PORT=3000
ENTRYPOINT ["./docker-entrypoint-wrapper.sh"]
CMD []
COPY ./contrib/generate-config-env.sh .
COPY ./contrib/test-nginx-conf.sh .
COPY ./contrib/test-config-env.sh .
COPY ./contrib/nginx.conf.tmpl .
COPY ./contrib/docker-entrypoint-wrapper.sh .
RUN bash ./test-nginx-conf.sh
COPY --from=playground-builder /app/build/ /usr/share/nginx/html/