fix alot of things
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -7,9 +7,7 @@ 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
|
||||
ENV NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
||||
|
||||
# Build the Next.js application
|
||||
RUN npm run build
|
||||
@@ -26,30 +24,12 @@ RUN mkdir -p /app/public
|
||||
COPY --from=builder /app/package.json /app/package-lock.json ./
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/server.js ./
|
||||
COPY --from=builder /app/.env.tor ./
|
||||
COPY --from=builder /app/.env.backend ./
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# If you have a backend folder, copy it as well
|
||||
COPY --from=builder /app/backend ./backend
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# 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
|
||||
# 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
|
||||
# Set port for internal API calls
|
||||
ENV INTERNAL_API_PORT=3000
|
||||
# Disable telemetry
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
||||
|
||||
|
||||
# Start Next.js server
|
||||
CMD ["npm", "run", "start:tor"]
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user