This commit is contained in:
NotII
2025-03-10 18:30:55 +00:00
parent 1bfc5df767
commit bc6280efda
2 changed files with 17 additions and 10 deletions

View File

@@ -3,7 +3,11 @@
NEXT_PUBLIC_API_URL=/api
# Flag to indicate we're running in Tor mode
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 relative URLs for all API communications - critical for Tor
SERVER_API_URL=/api
# Disable HTTPS for Tor communication (onion services already provide encryption)
USE_HTTPS=false
# Tor uses the same port for both internal and external communications
INTERNAL_API_PORT=3000
# Tell the app to check for onion addresses
CHECK_ONION_ADDRESS=true

View File

@@ -36,14 +36,17 @@ COPY --from=builder /app/backend ./backend
EXPOSE 3000
# Set runtime environment variables
# Set runtime environment variables - these will be overridden by .env.tor when running in Tor mode
ENV NODE_ENV=production
# Use relative URLs for maximum Tor compatibility
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
# Running in Tor mode
ENV NEXT_PUBLIC_TOR_MODE=true
# Use relative URLs for server components - critical for Tor
ENV SERVER_API_URL=/api
# Disable HTTPS for onion services (they're already encrypted)
ENV USE_HTTPS=false
# Ensure internal API calls for server components go to the right port
# Set port for internal API calls
ENV INTERNAL_API_PORT=3000
# Disable telemetry
ENV NEXT_TELEMETRY_DISABLED=1