mirror of
https://github.com/myronblair/kino-app
synced 2026-07-28 05:23:45 -05:00
auto-commit for 28f1e986-c2af-4742-ad64-e0661980843c
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Kino frontend — React build + nginx reverse proxy
|
||||
# Multi-stage: build with Node, serve with nginx
|
||||
|
||||
# ---------- Build stage ----------
|
||||
FROM node:20-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# When BACKEND_URL is empty, frontend uses relative /api which nginx below proxies.
|
||||
# This keeps auth cookies / CORS trivial and works behind any reverse proxy.
|
||||
ENV REACT_APP_BACKEND_URL=""
|
||||
|
||||
COPY package.json yarn.lock* ./
|
||||
RUN yarn install --frozen-lockfile --network-timeout 600000
|
||||
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
# ---------- Serve stage ----------
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
# Custom config: SPA fallback + /api reverse proxy + large uploads + streaming timeouts
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Static build
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user