This commit is contained in:
NotII
2025-03-10 17:54:55 +00:00
parent e926833019
commit 9455ab762e
2 changed files with 16 additions and 1 deletions

View File

@@ -2,4 +2,8 @@
# Using relative URLs for maximum compatibility
NEXT_PUBLIC_API_URL=/api
# Flag to indicate we're running in Tor mode
NEXT_PUBLIC_TOR_MODE=true
NEXT_PUBLIC_TOR_MODE=true
# Force relative URLs for internal API communication
SERVER_API_URL=http://localhost:3000/api
# Disable HTTPS for internal container communication
USE_HTTPS=false

View File

@@ -7,7 +7,9 @@ RUN npm install --force
COPY . .
# Set build-time environment variables to use relative URLs
ENV NEXT_PUBLIC_API_URL=/api
ENV NEXT_TELEMETRY_DISABLED=1
# Build the Next.js application
RUN npm run build
@@ -34,8 +36,17 @@ COPY --from=builder /app/backend ./backend
EXPOSE 3000
# Set runtime environment variables
ENV NODE_ENV=production
ENV NEXT_PUBLIC_API_URL=/api
# Force server to use internal URLs (no localhost references)
ENV SERVER_API_URL=http://localhost:3000/api
# Disable HTTPS for internal container communication
ENV USE_HTTPS=false
# Ensure internal API calls for server components go to the right port
ENV INTERNAL_API_PORT=3000
# Disable telemetry
ENV NEXT_TELEMETRY_DISABLED=1
# Start Next.js server
CMD ["npm", "run", "start:tor"]