fix: switch admin to subdomain mode and fix frozen-lockfile build
- Remove /admin path prefix (using admin.protdskj.top subdomain instead) - Change pnpm install to --no-frozen-lockfile for lockfile compatibility - Simplify admin Nginx config to standard SPA serving 🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
@@ -10,7 +10,7 @@ COPY apps/api/package.json apps/api/
|
||||
COPY apps/player/package.json apps/player/
|
||||
COPY apps/admin/package.json apps/admin/
|
||||
COPY packages/shared/package.json packages/shared/
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
|
||||
@@ -10,7 +10,7 @@ COPY apps/api/package.json apps/api/
|
||||
COPY apps/player/package.json apps/player/
|
||||
COPY apps/admin/package.json apps/admin/
|
||||
COPY packages/shared/package.json packages/shared/
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
|
||||
@@ -9,8 +9,8 @@ server {
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||
|
||||
location /admin/api/ {
|
||||
proxy_pass http://api:3000/api/;
|
||||
location /api/ {
|
||||
proxy_pass http://api:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -18,16 +18,7 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /admin/ {
|
||||
alias /usr/share/nginx/html/;
|
||||
try_files $uri $uri/ @admin_spa;
|
||||
}
|
||||
|
||||
location @admin_spa {
|
||||
rewrite ^ /index.html break;
|
||||
}
|
||||
|
||||
location = / {
|
||||
return 301 /admin/;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ COPY apps/api/package.json apps/api/
|
||||
COPY apps/player/package.json apps/player/
|
||||
COPY apps/admin/package.json apps/admin/
|
||||
COPY packages/shared/package.json packages/shared/
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user