diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..eb3b95f --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# OpenCand API Configuration +# The base URL for the OpenCand API +VITE_API_BASE_URL=https://api.example.com diff --git a/OpenCand.UI.dockerfile b/OpenCand.UI.dockerfile new file mode 100644 index 0000000..4fa9021 --- /dev/null +++ b/OpenCand.UI.dockerfile @@ -0,0 +1,26 @@ +# ─── Stage 1: Build ─────────────────────────────────────────────────────── +FROM node:slim AS builder +WORKDIR /app + +COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile + +COPY . . + +ARG VITE_API_BASE_URL +ENV VITE_API_BASE_URL=${VITE_API_URL} + +RUN yarn build + +# ─── Stage 2: Serve ──────────────────────────────────────────────────────── +FROM nginx:stable-alpine +# Remove default nginx html +RUN rm -rf /usr/share/nginx/html/* +# Copy our built files into nginx’s html folder +COPY --from=builder /app/dist /usr/share/nginx/html + +# (Optional) If you need any custom nginx.conf, COPY it here— +# e.g. COPY nginx.conf /etc/nginx/nginx.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/index.html b/index.html index e4b78ea..e31f407 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,8 @@
- -