fix(deploy): serve console static assets correctly
This commit is contained in:
parent
8fa9cd34bf
commit
41760a0227
@ -4,8 +4,7 @@
|
||||
@secondary host {$SECONDARY_DOMAIN}
|
||||
redir @secondary https://{$PRIMARY_DOMAIN}{uri} permanent
|
||||
|
||||
@next_static path /_next/static/*
|
||||
handle @next_static {
|
||||
handle_path /_next/static/* {
|
||||
root * /srv
|
||||
header Cache-Control "public, max-age=31536000, immutable"
|
||||
file_server
|
||||
|
||||
@ -7,9 +7,9 @@ services:
|
||||
- -c
|
||||
- |
|
||||
set -eu
|
||||
rm -rf /assets/_next /assets/public
|
||||
mkdir -p /assets/_next/static /assets/public
|
||||
cp -R /app/dashboard/static/. /assets/_next/static
|
||||
rm -rf /assets/_next /assets/chunks /assets/public
|
||||
mkdir -p /assets /assets/public
|
||||
cp -R /app/dashboard/static/. /assets/
|
||||
cp -R /app/dashboard/public/. /assets/public
|
||||
volumes:
|
||||
- frontend_static:/assets
|
||||
@ -22,6 +22,8 @@ services:
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3000
|
||||
volumes:
|
||||
- frontend_static:/app/dashboard/.next/static:ro
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user