ssr
Gitea Actions Demo / build_and_push (push) Successful in 1m14s Details

This commit is contained in:
artem 2026-09-18 23:32:34 +03:00
parent 8e0730aaeb
commit 95687bda3a
3 changed files with 64 additions and 49 deletions

View File

@ -26,7 +26,8 @@ COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=build /app/node_modules /app/node_modules COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/server /app/server COPY --from=build /app/server /app/server
COPY --from=build /app/package.json /app/package.json COPY --from=build /app/package.json /app/package.json
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/nginx.conf
RUN rm -f /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80

View File

@ -1,10 +1,25 @@
server { worker_processes auto;
listen 80; pid /tmp/nginx.pid;
server_name localhost;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on; gzip on;
gzip_comp_level 6; gzip_comp_level 6;
gzip_vary on; gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/rss+xml image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
server {
listen 80;
server_name localhost;
# SSR routes (search bots + guests get real HTML) # SSR routes (search bots + guests get real HTML)
location ~ ^/(explore|routes|sitemap\.xml|robots\.txt)$ { location ~ ^/(explore|routes|sitemap\.xml|robots\.txt)$ {
@ -32,7 +47,6 @@ server {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header Cookie $http_cookie; proxy_set_header Cookie $http_cookie;
} }
# If cookie present → fall through to static (SPA handles redirect)
root /usr/share/nginx/html; root /usr/share/nginx/html;
try_files /index.html =404; try_files /index.html =404;
} }
@ -59,3 +73,4 @@ server {
deny all; deny all;
} }
} }
}

View File

@ -16,7 +16,6 @@
<span>Дата:</span> {{ formatTime(item.workouted_at) }} <span>Дата:</span> {{ formatTime(item.workouted_at) }}
</li> </li>
<li v-if="item.photos && item.photos.length > 0"> <li v-if="item.photos && item.photos.length > 0">
<span>Фото:</span> {{ item.photos.length }} <span>Фото:</span> {{ item.photos.length }}
</li> </li>
<li v-if="item.speed"> <li v-if="item.speed">