Files
Camilla Schoeser acc66276f3
Deploy PHP / deploy (push) Failing after 2m10s
test local vs en ligne
2026-06-10 22:15:26 +02:00

77 lines
1.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: sushi-nginx-config
namespace: sushi
data:
default.conf: |
server {
listen 80;
root /var/www/html;
index index.php index.html;
error_page 404 /404.html;
types {
text/html html htm;
text/css css;
application/javascript js;
application/json json;
text/yaml yml yaml;
image/png png;
image/jpeg jpg jpeg;
image/svg+xml svg;
image/gif gif;
image/webp webp;
font/woff woff;
font/woff2 woff2;
}
location = /404.html {
root /var/www/html;
internal;
}
location /VUEJS/myapp/dist/ {
alias /var/www/html/VUEJS/myapp/dist/;
index index.html;
try_files $uri $uri/ /index.html;
}
location /VUEJS/myapp/dist/assets/ {
alias /var/www/html/VUEJS/myapp/dist/assets/;
access_log off;
expires 1y;
add_header Cache-Control "public";
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.git {
deny all;
}
# 🔽 AJOUTE CE BLOC POUR REDIRIGER VERS TON BACKEND ELYSIA
location /api/ {
proxy_pass http://127.0.0.1:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
}