mirror of
https://github.com/andrey271192/Domain_web.git
synced 2026-09-22 15:01:58 +00:00
fix(deploy): sync static assets and nginx CSS route
Copy .next/static and public into standalone after build; serve /_next/static from nginx; verify CSS in install.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -50,6 +50,7 @@ build_app() {
|
||||
npm ci
|
||||
npx prisma generate
|
||||
npm run build
|
||||
bash scripts/sync-standalone-assets.sh "${INSTALL_DIR}"
|
||||
npx prisma db push --accept-data-loss
|
||||
}
|
||||
|
||||
@@ -81,6 +82,14 @@ server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
|
||||
location /_next/static/ {
|
||||
alias ${INSTALL_DIR}/.next/static/;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:${NODE_PORT};
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user