auto-commit for 28f1e986-c2af-4742-ad64-e0661980843c

This commit is contained in:
emergent-agent-e1
2026-07-23 22:01:21 +00:00
parent 21cdd24116
commit 1471d58385
9 changed files with 365 additions and 47 deletions
+29
View File
@@ -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;"]
+45
View File
@@ -0,0 +1,45 @@
server {
listen 80;
server_name _;
# Allow multi-GB movie uploads
client_max_body_size 20g;
# Long timeouts for streaming + transcode responses
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_connect_timeout 60s;
# gzip static
gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
# Reverse proxy /api → backend service on the compose network
location /api/ {
proxy_pass http://backend:8001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Streaming needs unbuffered responses for Range requests
proxy_buffering off;
proxy_request_buffering off;
}
# SPA static files with client-side routing fallback
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
# Cache static assets aggressively (hashed filenames from CRA)
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
root /usr/share/nginx/html;
expires 30d;
add_header Cache-Control "public, immutable";
}
}
+1 -46
View File
@@ -38,52 +38,7 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<a
id="emergent-badge"
target="_blank"
href="https://app.emergent.sh/?utm_source=emergent-badge"
style="
display: inline-flex !important;
box-sizing: border-box;
width: 178px;
height: 40px;
padding: 8px 12px 8px 12px;
align-items: center !important;
gap: 8px;
border-radius: 50px !important;
background: #000 !important;
position: fixed !important;
bottom: 16px;
right: 16px;
text-decoration: none;
font-family: -apple-system, BlinkMacSystemFont,
&quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell,
&quot;Open Sans&quot;, &quot;Helvetica Neue&quot;,
sans-serif !important;
font-size: 12px !important;
z-index: 9999 !important;
"
>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M15.5702 8.13142C15.7729 8.0412 16.0007 8.18878 15.9892 8.4103C15.8374 11.3192 14.0965 14.0405 11.2531 15.3065C8.40964 16.5725 5.2224 16.0453 2.95912 14.2117C2.78676 14.072 2.82955 13.804 3.03219 13.7137L4.95677 12.8568C5.04866 12.8159 5.15446 12.823 5.24204 12.8725C6.73377 13.7153 8.59176 13.8649 10.2772 13.1145C11.9626 12.3641 13.0947 10.8833 13.4665 9.21075C13.4883 9.11256 13.5539 9.02918 13.6457 8.98827L15.5702 8.13142Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3066 4.74698L15.5067 5.19653C15.5759 5.35178 15.5061 5.53366 15.3508 5.60278L1.29992 11.8586C1.14467 11.9278 0.962794 11.8579 0.893675 11.7027L0.701732 11.2716L0.693457 11.2531C-1.10317 7.21778 0.711626 2.49007 4.74692 0.693443C8.78221 -1.10318 13.51 0.711693 15.3066 4.74698ZM2.82356 8.55367C2.63552 8.63739 2.41991 8.51617 2.40853 8.31065C2.28373 6.05724 3.53858 3.85787 5.72286 2.88536C7.90715 1.91286 10.3813 2.45199 11.9724 4.05256C12.1175 4.19854 12.0633 4.43988 11.8753 4.5236L2.82356 8.55367Z" fill="white"/>
</svg>
<p
style="
color: #FFF !important;
font-family: 'Inter', sans-serif !important;
font-size: 13px !important;
font-style: normal !important;
font-weight: 600 !important;
line-height: 20px !important;
margin: 0 !important;
white-space: nowrap !important;
"
>
Made with Emergent
</p>
</a>
<script>
<script>
!(function (t, e) {
var o, n, p, r;
e.__SV ||