Skip to content

Commit

Permalink
👷 build: improve dockerfile of rewrite (lobehub#5943)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Feb 9, 2025
1 parent 704de4a commit eea2d2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID

ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"

# Make the middleware rewrite through local as default
# refs: https://github.com/lobehub/lobe-chat/issues/5876
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"

# Sentry
ENV NEXT_PUBLIC_SENTRY_DSN="${NEXT_PUBLIC_SENTRY_DSN}" \
SENTRY_ORG="" \
Expand Down Expand Up @@ -135,6 +131,10 @@ ENV NODE_ENV="production" \
NODE_TLS_REJECT_UNAUTHORIZED="" \
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"

# Make the middleware rewrite through local as default
# refs: https://github.com/lobehub/lobe-chat/issues/5876
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"

# set hostname to localhost
ENV HOSTNAME="0.0.0.0" \
PORT="3210"
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.database
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID

ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"

# Make the middleware rewrite through local as default
# refs: https://github.com/lobehub/lobe-chat/issues/5876
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"

ENV NEXT_PUBLIC_SERVICE_MODE="${NEXT_PUBLIC_SERVICE_MODE:-server}" \
NEXT_PUBLIC_ENABLE_NEXT_AUTH="${NEXT_PUBLIC_ENABLE_NEXT_AUTH:-1}" \
APP_URL="http://app.com" \
Expand Down Expand Up @@ -153,6 +149,10 @@ ENV NODE_ENV="production" \
NODE_TLS_REJECT_UNAUTHORIZED="" \
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"

# Make the middleware rewrite through local as default
# refs: https://github.com/lobehub/lobe-chat/issues/5876
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"

# set hostname to localhost
ENV HOSTNAME="0.0.0.0" \
PORT="3210"
Expand Down
4 changes: 2 additions & 2 deletions src/app/[variants]/(main)/changelog/modal/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { useLayoutEffect } from 'react';
import { useEffect } from 'react';

import { useQueryRoute } from '@/hooks/useQueryRoute';

Expand All @@ -13,7 +13,7 @@ import { useQueryRoute } from '@/hooks/useQueryRoute';
const ChangelogModal = () => {
const router = useQueryRoute();

useLayoutEffect(() => {
useEffect(() => {
router.replace('/changelog');
}, []);

Expand Down

0 comments on commit eea2d2c

Please sign in to comment.