Inclui serviços portal-modumfiscal-web (Nuxt 3 SSR, porta 3000) e portal-redis (Redis 7 Alpine, AOF) em ambos os ambientes. Adiciona portal.conf no nginx com regex wildcard para subdomínios do contribuinte, excluindo app/sistema que seguem para o backoffice. Em prod, retira *.modumfiscal.com.br do modumfiscal.conf para não bloquear o regex do portal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
39 lines
975 B
Plaintext
39 lines
975 B
Plaintext
upstream core_api {
|
|
server app_modumfiscal-api.app-net:8090;
|
|
}
|
|
|
|
upstream frontend {
|
|
server app_modumfiscal-front.app-net:80;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name app.modumfiscal.com.br sistema.modumfiscal.com.br;
|
|
|
|
location /api/ {
|
|
proxy_pass http://core_api;
|
|
proxy_http_version 1.1;
|
|
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;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://frontend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_intercept_errors on;
|
|
error_page 404 = @fallback;
|
|
}
|
|
|
|
location @fallback {
|
|
proxy_pass http://frontend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
rewrite ^ /index.html break;
|
|
}
|
|
}
|