ваше сообщение коммита
This commit is contained in:
134
frontend/nginx-optimized.conf
Normal file
134
frontend/nginx-optimized.conf
Normal file
@@ -0,0 +1,134 @@
|
||||
server {
|
||||
server_name hb3-accelerator.com www.hb3-accelerator.com;
|
||||
|
||||
# Включаем сжатие
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types
|
||||
text/plain
|
||||
text/css
|
||||
text/xml
|
||||
text/javascript
|
||||
application/javascript
|
||||
application/json
|
||||
application/xml+rss
|
||||
application/atom+xml
|
||||
image/svg+xml;
|
||||
|
||||
# Кеширование статических файлов
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
proxy_pass http://localhost:9000;
|
||||
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;
|
||||
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
add_header Vary Accept-Encoding;
|
||||
|
||||
# Для WebSocket/HMR:
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# Основные страницы
|
||||
location / {
|
||||
proxy_pass http://localhost:9000;
|
||||
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_buffering on;
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 8 4k;
|
||||
proxy_busy_buffers_size 8k;
|
||||
|
||||
# Таймауты
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
proxy_read_timeout 30s;
|
||||
|
||||
# Для WebSocket/HMR:
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# Для WebSocket соединений
|
||||
location /ws {
|
||||
proxy_pass http://localhost:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
|
||||
# Таймауты для WebSocket
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
# API endpoints
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:8000/api/;
|
||||
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;
|
||||
|
||||
# Оптимизация для API
|
||||
proxy_buffering on;
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 8 4k;
|
||||
proxy_busy_buffers_size 8k;
|
||||
|
||||
# Таймауты
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
proxy_read_timeout 30s;
|
||||
|
||||
# Для WebSocket:
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# SSL настройки
|
||||
listen 443 ssl http2; # Включаем HTTP/2
|
||||
ssl_certificate /etc/letsencrypt/live/hb3-accelerator.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/hb3-accelerator.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
# Дополнительные оптимизации SSL (только если не конфликтуют)
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# Безопасность
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header X-Frame-Options DENY always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
}
|
||||
|
||||
# HTTP to HTTPS redirect
|
||||
server {
|
||||
if ($host = hb3-accelerator.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
listen 80;
|
||||
server_name hb3-accelerator.com www.hb3-accelerator.com;
|
||||
return 404;
|
||||
}
|
||||
32
frontend/nginx-tunnel.conf
Normal file
32
frontend/nginx-tunnel.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Прокси для API (если нужно)
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
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;
|
||||
}
|
||||
|
||||
# Прокси для WebSocket (если нужно)
|
||||
location /ws {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
}
|
||||
}
|
||||
3
frontend/nginx.Dockerfile
Normal file
3
frontend/nginx.Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM nginx:alpine
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
COPY nginx-tunnel.conf /etc/nginx/conf.d/default.conf
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>DApp for Business</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -169,6 +169,11 @@ const routes = [
|
||||
name: 'email-settings',
|
||||
component: () => import('@/views/settings/AI/EmailSettingsView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/content',
|
||||
name: 'content-page',
|
||||
component: () => import('../views/ContentPageView.vue'),
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
25
frontend/src/views/ContentPageView.vue
Normal file
25
frontend/src/views/ContentPageView.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<BaseLayout>
|
||||
<div class="content-page-block">
|
||||
<h2>Контент</h2>
|
||||
<p>Здесь будет размещён контент.</p>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import BaseLayout from '../components/BaseLayout.vue';
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content-page-block {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 32px rgba(0,0,0,0.12);
|
||||
padding: 32px 24px 24px 24px;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -25,6 +25,13 @@
|
||||
<i class="fas fa-table"></i> Подробнее
|
||||
</button>
|
||||
</div>
|
||||
<!-- Новый блок Контент -->
|
||||
<div class="crm-content-block">
|
||||
<h2>Контент</h2>
|
||||
<button class="btn btn-info" @click="goToContent">
|
||||
<i class="fas fa-file-alt"></i> Подробнее
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</template>
|
||||
@@ -195,6 +202,10 @@ function goToDleManagement() {
|
||||
function goToContactsList() {
|
||||
router.push({ name: 'contacts-list' });
|
||||
}
|
||||
|
||||
function goToContent() {
|
||||
router.push({ name: 'content-page' });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -347,4 +358,24 @@ strong {
|
||||
font-size: 1rem;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
.crm-content-block {
|
||||
margin: 32px 0 24px 0;
|
||||
padding: 24px;
|
||||
background: #f8fafc;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.crm-content-block h2 {
|
||||
margin: 0;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.crm-content-block .btn {
|
||||
font-size: 1rem;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -16,8 +16,8 @@
|
||||
<button class="details-btn" @click="$router.push('/settings/security')">Подробнее</button>
|
||||
</div>
|
||||
<div class="main-block">
|
||||
<h3>Интерфейс</h3>
|
||||
<p>Настройки внешнего вида, локализации и пользовательского опыта.</p>
|
||||
<h3>Сервер</h3>
|
||||
<p>Настройки серверов, хостинга и публикации приложения.</p>
|
||||
<button class="details-btn" @click="$router.push('/settings/interface')">Подробнее</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,6 +53,7 @@ export default defineConfig({
|
||||
usePolling: true,
|
||||
interval: 1000,
|
||||
ignored: ['**/node_modules/**', '**/.git/**', '**/dist/**', '**/.idea/**', '**/.vscode/**']
|
||||
}
|
||||
},
|
||||
hmr: false
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user