feat(deploy): add deployment configs, post-receive hook, and nginx reverse proxy for foxxio

This commit is contained in:
unknown committed 2026-10-17 16:22:06 +07:00
1 parent 0b6e5310c0
commit dd79519bf7
7 files changed
+471

No files matched your search

@@ -0,0 +1,24 @@
server {
listen 80;
server_name admin.foxxio.ddcsprocket.com;
# ตำแหน่งโฟลเดอร์ Build ของ React Admin Panel
root /var/www/html/foxxio_admin;
index index.html;
# สำคัญมากสำหรับ React Router SPA:
# ถ้าไม่พบไฟล์ ($uri) ให้ส่งกลับไปที่ index.html เสมอ
location / {
try_files $uri $uri/ /index.html;
}
# ตั้งค่า Cache สำหรับ Static Assets เพื่อความเร็ว
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}
# Logging
error_log /var/log/nginx/foxxio_admin_error.log;
access_log /var/log/nginx/foxxio_admin_access.log;
}