Initial commit: HotelSync PMS v0.1.0
- React 18 + TypeScript + Vite + Tailwind CSS - Шахматка бронирований (drag-to-book) - Страницы: Calendar, Bookings, Rooms, Housekeeping, Channels, API Docs, Settings - Роли: super_admin, hotel_manager, housekeeper - Светлая/тёмная тема - Docker + Nginx конфигурация - Лендинг hotelsync.ru
This commit is contained in:
67
deploy/nginx/conf.d/hotelsync.conf
Normal file
67
deploy/nginx/conf.d/hotelsync.conf
Normal file
@@ -0,0 +1,67 @@
|
||||
# ── Редирект HTTP → HTTPS ─────────────────────────────────────────────────
|
||||
server {
|
||||
listen 80;
|
||||
server_name hotelsync.ru www.hotelsync.ru app.hotelsync.ru api.hotelsync.ru;
|
||||
|
||||
# Certbot challenge
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
# ── app.hotelsync.ru — Панель управления (React SPA) ─────────────────────
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name app.hotelsync.ru;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/app.hotelsync.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/app.hotelsync.ru/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
proxy_pass http://frontend:80;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
# ── hotelsync.ru — Лендинг (редирект на app пока нет лендинга) ───────────
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name hotelsync.ru www.hotelsync.ru;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/hotelsync.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/hotelsync.ru/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
return 302 https://app.hotelsync.ru;
|
||||
}
|
||||
}
|
||||
|
||||
# ── api.hotelsync.ru — API Backend ────────────────────────────────────────
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name api.hotelsync.ru;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/api.hotelsync.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/api.hotelsync.ru/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
proxy_pass http://api:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
32
deploy/nginx/nginx.conf
Normal file
32
deploy/nginx/nginx.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 20M;
|
||||
|
||||
# Логи
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
# Gzip
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css application/json application/javascript
|
||||
text/xml application/xml text/javascript image/svg+xml;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
Reference in New Issue
Block a user