-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
33 lines (27 loc) · 1 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
# Use the ARM64 Node.js image as the builder stage
FROM node:18-bullseye-slim AS builder
ARG VITE_OPENAI_API_KEY=REPLACE_WITH_YOUR_OWN
ARG VITE_OPENAI_HOST=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_REGION=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_ACCESS_KEY_ID=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_ACCESS_KEY=REPLACE_WITH_YOUR_OWN
ARG VITE_AZURE_REGION=REPLACE_WITH_YOUR_OWN
ARG VITE_AZURE_KEY=REPLACE_WITH_YOUR_OWN
ENV VITE_OPENAI_API_KEY=$VITE_OPENAI_API_KEY \
VITE_OPENAI_HOST=$VITE_OPENAI_HOST \
VITE_AWS_REGION=$VITE_AWS_REGION \
VITE_AWS_ACCESS_KEY_ID=$VITE_AWS_ACCESS_KEY_ID \
VITE_AWS_ACCESS_KEY=$VITE_AWS_ACCESS_KEY \
VITE_AZURE_REGION=$VITE_AZURE_REGION \
VITE_AZURE_KEY=$VITE_AZURE_KEY
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
# Use a smaller ARM64-compatible base image for the final stage
FROM arm64v8/nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/dist .
ENTRYPOINT ["nginx", "-g", "daemon off;"]