deploy: canlı veri backend'ini container'a ekle (nginx /api → Node :3001)
- Dockerfile: nginx + Node tek container; backend arka planda, nginx ön planda - nginx.conf: /api → 127.0.0.1:3001 proxy - dt-store: node:sqlite guard (yoksa DT devre dışı, açık ihaleler yine canlı) - Açık ihale canlı verisi sıfır npm bağımlılığıyla deploy'da çalışır
This commit is contained in:
+12
-3
@@ -5,10 +5,19 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Ensure proper MIME types for JavaScript, CSS, etc.
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
# Serve static assets directly
|
||||
# Canlı veri backend'i (aynı container'da Node, port 3001)
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_connect_timeout 10s;
|
||||
}
|
||||
|
||||
# Statik varlıklar
|
||||
location /assets/ {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri =404;
|
||||
@@ -16,7 +25,7 @@ server {
|
||||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
|
||||
# SPA routing fallback for app routes
|
||||
# SPA yönlendirmesi
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user