Compare commits
3
Commits
e9cd22d36f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea6c43f5af | ||
|
|
2cb2bc0729 | ||
|
|
ee4562530a |
No files matched your search
@@ -34,10 +34,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./frontend/.env.local
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
|
||||
+16
-2
@@ -2,10 +2,24 @@ FROM node:22-bookworm-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# registry.npmjs.org resolves to Cloudflare's IPv6-only records here, and
|
||||
# Docker's default bridge network has flaky IPv6 egress — Node's Happy
|
||||
# Eyeballs then hangs on IPv6 before timing out instead of falling back to
|
||||
# IPv4 quickly, causing intermittent ETIMEDOUT mid-install.
|
||||
ENV NODE_OPTIONS=--dns-result-order=ipv4first
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install
|
||||
# registry.npmjs.org itself is unreliable from this host (mid-download
|
||||
# stalls even with aggressive npm retries) — route through npmmirror.com
|
||||
# instead, which is consistently reachable from this network.
|
||||
RUN npm config set registry https://registry.npmmirror.com && \
|
||||
npm config set fetch-retries 8 && \
|
||||
npm config set fetch-retry-mintimeout 20000 && \
|
||||
npm config set fetch-retry-maxtimeout 120000 && \
|
||||
npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
CMD ["npm", "run", "dev", "--", "--hostname", "0.0.0.0"]
|
||||
CMD ["npm", "start", "--", "--hostname", "0.0.0.0"]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -47,6 +47,7 @@ export default async function DocumentsPage({
|
||||
// Логика определения конкретного файла для отображения
|
||||
let fileForLink: string | null = null;
|
||||
let previewUrl: string | null = null;
|
||||
const selectedFiles: string[] | null = Array.isArray(selectedItem?.file) ? selectedItem.file : null;
|
||||
|
||||
if (selectedItem?.file) {
|
||||
if (Array.isArray(selectedItem.file)) {
|
||||
@@ -125,16 +126,16 @@ export default async function DocumentsPage({
|
||||
<h2>{selectedItem?.title ?? "Документ не выбран"}</h2>
|
||||
|
||||
{/* Вывод списка кнопок, если файлов несколько */}
|
||||
{selectedItem?.file && Array.isArray(selectedItem.file) && selectedItem.file.length > 1 && (
|
||||
{selectedFiles && selectedFiles.length > 1 && (
|
||||
<div style={{ display: "flex", gap: "8px", flexWrap: "wrap", marginTop: "12px" }}>
|
||||
{selectedItem.file.map((fileName, idx) => {
|
||||
const validCurrentIndex = selectedIndex < selectedItem.file.length ? selectedIndex : 0;
|
||||
{selectedFiles.map((fileName, idx) => {
|
||||
const validCurrentIndex = selectedIndex < selectedFiles.length ? selectedIndex : 0;
|
||||
const isActive = validCurrentIndex === idx;
|
||||
|
||||
return (
|
||||
<Link
|
||||
key={fileName}
|
||||
href={`/documents?doc=${selectedItem.id}&fileIndex=${idx}`}
|
||||
href={`/documents?doc=${selectedItem?.id}&fileIndex=${idx}`}
|
||||
className={`documents-link documents-link--button ${
|
||||
isActive ? "documents-link--active" : ""
|
||||
}`}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"lucide-react": "^0.469.0",
|
||||
"next": "15.1.6",
|
||||
"next": "15.1.11",
|
||||
"react": "19.0.0",
|
||||
"react-dom": "19.0.0"
|
||||
},
|
||||
@@ -19,7 +19,7 @@
|
||||
"@types/react": "^19.0.2",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-next": "15.1.6",
|
||||
"eslint-config-next": "15.1.11",
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
hacked by trenggalek6etar
|
||||
@@ -1 +0,0 @@
|
||||
hacked by trenggalek6etar
|
||||
Reference in new issue
Block a user